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

Class: Calendar_Engine_UnixTS

Source Location: Program_Root/Engine/UnixTS.php

Class Overview


Performs calendar calculations based on the PHP date() function and Unix timestamps (using PHP's mktime() function).

Methods


Inherited Variables

Inherited Methods


Class Details

Performs calendar calculations based on the PHP date() function and Unix timestamps (using PHP's mktime() function).
access:  protected

Class Methods


method dateToStamp

Returns a timestamp

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

API Tags:

return:  Unix timestamp
access:  protected

Parameters:

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

method getDaysInMonth

Returns the number of days in a month, given year and month

int getDaysInMonth( int $y, int $m)

API Tags:

return:  days in month
access:  protected

Parameters:

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

method getDaysInWeek

Returns the number of days in a week

int getDaysInWeek( )

API Tags:

return:  (7)
access:  protected

method getFirstDayInMonth

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

given year and month



int getFirstDayInMonth( int $y, int $m)

API Tags:

return:  from 0 to 7
access:  protected

Parameters:

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

method getFirstDayOfWeek

Returns the default first day of the week

int getFirstDayOfWeek( )

API Tags:

return:  (default 1 = Monday)
access:  protected

method getHoursInDay

Returns the number of hours in a day

int getHoursInDay( [mixed $d = null])

API Tags:

return:  (24)
access:  protected

method getMaxYears

The upper limit on years that the Calendar Engine can work with

int getMaxYears( )

API Tags:

return:  (2037)
access:  protected

method getMinutesInHour

Returns the number of minutes in an hour

int getMinutesInHour( [mixed $h = null])

API Tags:

return:  (60)
access:  protected

method getMinYears

The lower limit on years that the Calendar Engine can work with

int getMinYears( )

API Tags:

return:  (1970 if it's Windows and 1902 for all other OSs)
access:  protected

method getMonthsInYear

Returns the number of months in a year

int getMonthsInYear( [mixed $y = null])

API Tags:

return:  (12)
access:  protected

method getSecondsInMinute

Returns the number of seconds in a minutes

int getSecondsInMinute( [mixed $i = null])

API Tags:

return:  (60)
access:  protected

method getWeekDays

Returns a list of integer days of the week beginning 0

array getWeekDays( )

API Tags:

return:  (0,1,2,3,4,5,6) 1 = Monday
access:  protected

method stampToDay

Returns a numeric day given a timestamp

int stampToDay( int $stamp)

API Tags:

return:  day (e.g. 15)
access:  protected

Parameters:

int   $stamp   Unix timestamp

method stampToHour

Returns a numeric hour given a timestamp

int stampToHour( int $stamp)

API Tags:

return:  hour (e.g. 13)
access:  protected

Parameters:

int   $stamp   Unix timestamp

method stampToMinute

Returns a numeric minute given a timestamp

int stampToMinute( int $stamp)

API Tags:

return:  minute (e.g. 34)
access:  protected

Parameters:

int   $stamp   Unix timestamp

method stampToMonth

Returns a numeric month given a timestamp

int stampToMonth( int $stamp)

API Tags:

return:  month (e.g. 9)
access:  protected

Parameters:

int   $stamp   Unix timestamp

method stampToSecond

Returns a numeric second given a timestamp

int stampToSecond( int $stamp)

API Tags:

return:  second (e.g. 51)
access:  protected

Parameters:

int   $stamp   Unix timestamp

method stampToYear

Returns a numeric year given a timestamp

int stampToYear( int $stamp)

API Tags:

return:  year (e.g. 2003)
access:  protected

Parameters:

int   $stamp   Unix timestamp
Released under the PHP license (http://www.php.net/license/3_0.txt)
Documentation generated on Thu, 30 Oct 2003 16:36:06 +0100 by phpDocumentor 1.2.2