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

Class: Calendar_Engine_PearDate

Source Location: Program_Root/Engine/PearDate.php

Class Overview


Performs calendar calculations based on the PEAR::Date class

Methods


Inherited Variables

Inherited Methods


Class Details

Performs calendar calculations based on the PEAR::Date class
access:  protected

Class Methods


method adjustDate

Set the correct date values (useful for math operations on dates)

void adjustDate( int &$y, int &$m, int &$d, int &$h, int &$i, int &$s)

API Tags:

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 dateToStamp

Returns a iso-8601 datetime

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

API Tags:

return:  iso-8601 datetime
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:  9999
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:

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 iso-8601 datetime

int stampToDay( string $stamp)

API Tags:

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

Parameters:

string   $stamp   iso-8601 datetime (YYYY-MM-DD HH:MM:SS)

method stampToHour

Returns a numeric hour given a iso-8601 datetime

int stampToHour( string $stamp)

API Tags:

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

Parameters:

string   $stamp   iso-8601 datetime (YYYY-MM-DD HH:MM:SS)

method stampToMinute

Returns a numeric minute given a iso-8601 datetime

int stampToMinute( string $stamp)

API Tags:

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

Parameters:

string   $stamp   iso-8601 datetime (YYYY-MM-DD HH:MM:SS)

method stampToMonth

Returns a numeric month given a iso-8601 datetime

int stampToMonth( string $stamp)

API Tags:

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

Parameters:

string   $stamp   iso-8601 datetime (YYYY-MM-DD HH:MM:SS)

method stampToSecond

Returns a numeric second given a iso-8601 datetime

int stampToSecond( string $stamp)

API Tags:

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

Parameters:

string   $stamp   iso-8601 datetime (YYYY-MM-DD HH:MM:SS)

method stampToYear

Returns a numeric year given a iso-8601 datetime

int stampToYear( string $stamp)

API Tags:

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

Parameters:

string   $stamp   iso-8601 datetime (YYYY-MM-DD HH:MM:SS)
Released under the PHP license (http://www.php.net/license/3_0.txt)
Documentation generated on Thu, 30 Oct 2003 16:36:04 +0100 by phpDocumentor 1.2.2