Calendar
[ class tree: Calendar ] [ index: Calendar ] [ all elements ]

Class: Calendar_Engine_Interface

Source Location: /Calendar-0.5.2/Engine/Interface.php

Class Overview


The methods the classes implementing the Calendar_Engine must implement.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 32]
The methods the classes implementing the Calendar_Engine must implement.

Note this class is not used but simply to help development

  • Access: protected


[ Top ]


Method Detail

dateToStamp   [line 121]

int dateToStamp( int $y, int $m, int $d, int $h, int $i, int $s)

Returns a timestamp. Can be worth "caching" generated timestamps in a static variable, identified by the params this method accepts, to timestamp will only be calculated once.
  • Return: (depends on implementation)
  • Access: protected

Parameters:

int   $y   —  year (e.g. 2003)
int   $m   —  month (e.g. 9)
int   $d   —  day (e.g. 13)
int   $h   —  hour (e.g. 13)
int   $i   —  minute (e.g. 34)
int   $s   —  second (e.g. 53)

[ Top ]

getDayOfWeek   [line 233]

int getDayOfWeek( int $y, int $m, int $d)

Returns the number of the day of the week (0=sunday, 1=monday...)
  • Return: weekday number
  • Access: protected

Parameters:

int   $y   —  year (2003)
int   $m   —  month (9)
int   $d   —  day (4)

[ Top ]

getDaysInMonth   [line 160]

int getDaysInMonth( int $y, int $m)

Returns the number of days in a month, given year and month
  • Return: days in month
  • Access: protected

Parameters:

int   $y   —  year (e.g. 2003)
int   $m   —  month (e.g. 9)

[ Top ]

getDaysInWeek   [line 184]

int getDaysInWeek( [int $y = NULL], [int $m = NULL], [int $d = NULL])

Returns the number of days in a week
  • Return: (e.g. 7)
  • Access: protected

Parameters:

int   $y   —  year (2003)
int   $m   —  month (9)
int   $d   —  day (4)

[ Top ]

getFirstDayInMonth   [line 172]

int getFirstDayInMonth( int $y, int $m)

Returns numeric representation of the day of the week in a month,

given year and month

  • Access: protected

Parameters:

int   $y   —  year (e.g. 2003)
int   $m   —  month (e.g. 9)

[ Top ]

getFirstDayOfWeek   [line 259]

int getFirstDayOfWeek( [int $y = NULL], [int $m = NULL], [int $d = NULL])

Returns the default first day of the week as an integer. Must be a

member of the array returned from getWeekDays


Parameters:

int   $y   —  year (2003)
int   $m   —  month (9)
int   $d   —  day (4)

[ Top ]

getHoursInDay   [line 269]

int getHoursInDay( [int $y = null], [ $m = null], [ $d = null])

Returns the number of hours in a day

  • Return: (e.g. 24)
  • Access: protected

Parameters:

int   $y   —  (optional) day to get hours for
   $m   — 
   $d   — 

[ Top ]

getMaxYears   [line 130]

int getMaxYears( )

The upper limit on years that the Calendar Engine can work with
  • Return: (e.g. 2037)
  • Access: protected

[ Top ]

getMinutesInHour   [line 279]

int getMinutesInHour( [int $y = null], [ $m = null], [ $d = null], [ $h = null])

Returns the number of minutes in an hour
  • Access: protected

Parameters:

int   $y   —  (optional) hour to get minutes for
   $m   — 
   $d   — 
   $h   — 

[ Top ]

getMinYears   [line 139]

int getMinYears( )

The lower limit on years that the Calendar Engine can work with
  • Return: (e.g 1902)
  • Access: protected

[ Top ]

getMonthsInYear   [line 149]

int getMonthsInYear( [int $y = null])

Returns the number of months in a year
  • Return: (e.g. 12)
  • Access: protected

Parameters:

int   $y   —  (optional) year to get months for

[ Top ]

getSecondsInMinute   [line 289]

int getSecondsInMinute( [int $y = null], [ $m = null], [ $d = null], [ $h = null], [ $i = null])

Returns the number of seconds in a minutes
  • Access: protected

Parameters:

int   $y   —  (optional) minute to get seconds for
   $m   — 
   $d   — 
   $h   — 
   $i   — 

[ Top ]

getWeekDays   [line 245]

array getWeekDays( [int $y = NULL], [int $m = NULL], [int $d = NULL])

Returns the numeric values of the days of the week.
  • Return: list of numeric values of days in week, beginning 0
  • Access: protected

Parameters:

int   $y   —  year (2003)
int   $m   —  month (9)
int   $d   —  day (4)

[ Top ]

getWeekNInMonth   [line 209]

int getWeekNInMonth( int $y, int $m, int $d, [int $firstDay = 1])

Returns the number of the week in the month, given a date
  • Return: week number
  • Access: protected

Parameters:

int   $y   —  year (2003)
int   $m   —  month (9)
int   $d   —  day (4)
int   $firstDay   —  first day of the week (default: 1 - monday)

[ Top ]

getWeekNInYear   [line 196]

int getWeekNInYear( int $y, int $m, int $d)

Returns the number of the week in the year (ISO-8601), given a date
  • Return: week number
  • Access: protected

Parameters:

int   $y   —  year (2003)
int   $m   —  month (9)
int   $d   —  day (4)

[ Top ]

getWeeksInMonth   [line 221]

int getWeeksInMonth( int $y, int $m, int 2)

Returns the number of weeks in the month
  • Return: weeks number
  • Access: protected

Parameters:

int   2   —  first day of the week (default: 1 - monday)
int   $y   —  year (2003)
int   $m   —  month (9)

[ Top ]

stampCollection   [line 43]

mixed stampCollection( int $stamp)

Provides a mechansim to make sure parsing of timestamps into human dates is only performed once per timestamp.

Typically called "internally" by methods like stampToYear. Return value can vary, depending on the specific implementation

  • Access: protected

Parameters:

int   $stamp   —  timestamp (depending on implementation)

[ Top ]

stampToDay   [line 73]

int stampToDay( int $stamp)

Returns a numeric day given a timestamp
  • Return: day (e.g. 15)
  • Access: protected

Parameters:

int   $stamp   —  timestamp (depending on implementation)

[ Top ]

stampToHour   [line 83]

int stampToHour( int $stamp)

Returns a numeric hour given a timestamp
  • Return: hour (e.g. 13)
  • Access: protected

Parameters:

int   $stamp   —  timestamp (depending on implementation)

[ Top ]

stampToMinute   [line 93]

int stampToMinute( int $stamp)

Returns a numeric minute given a timestamp
  • Return: minute (e.g. 34)
  • Access: protected

Parameters:

int   $stamp   —  timestamp (depending on implementation)

[ Top ]

stampToMonth   [line 63]

int stampToMonth( int $stamp)

Returns a numeric month given a timestamp
  • Return: month (e.g. 9)
  • Access: protected

Parameters:

int   $stamp   —  timestamp (depending on implementation)

[ Top ]

stampToSecond   [line 103]

int stampToSecond( int $stamp)

Returns a numeric second given a timestamp
  • Return: second (e.g. 51)
  • Access: protected

Parameters:

int   $stamp   —  timestamp (depending on implementation)

[ Top ]

stampToYear   [line 53]

int stampToYear( int $stamp)

Returns a numeric year given a timestamp
  • Return: year (e.g. 2003)
  • Access: protected

Parameters:

int   $stamp   —  timestamp (depending on implementation)

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:54:44 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.