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

Class: Calendar_Engine_Interface

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

Class Overview


The methods the classes implementing the Calendar_Engine must implement.


Author(s):

Copyright:

  • 2003-2007 Harry Fuecks, Lorenzo Alberton

Methods


Inherited Variables

Inherited Methods


Class Details

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

Note this class is not used but simply to help development



[ Top ]


Method Detail

dateToStamp   [line 157]

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 286]

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 202]

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 230]

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 216]

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 316]

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 330]

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

Returns the number of hours in a day
  • Return: (e.g. 24)
  • Access: protected

Parameters:

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

[ Top ]

getMaxYears   [line 167]

int getMaxYears( )

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

[ Top ]

getMinutesInHour   [line 345]

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

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

Parameters:

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

[ Top ]

getMinYears   [line 177]

int getMinYears( )

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

[ Top ]

getMonthsInYear   [line 189]

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 361]

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

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

Parameters:

int   $y   —  year (2003)
int   $m   —  month (9)
int   $d   —  day (4)
int   $h   —  hour
int   $i   —  minute

[ Top ]

getWeekDays   [line 300]

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 259]

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 244]

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 272]

int getWeeksInMonth( int $y, int $m)

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

Parameters:

int   $y   —  year (2003)
int   $m   —  month (9)

[ Top ]

isToday   [line 373]

boolean isToday( int $stamp)

Checks if the given day is the current day
  • Access: protected

Parameters:

int   $stamp   —  timestamp (depending on implementation)

[ Top ]

stampCollection   [line 66]

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 102]

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 114]

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 126]

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 90]

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 138]

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 78]

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 15:37:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.