Date Class Reference
[Widely used base classes and interfaces]

Date's container and utilities. More...

Inheritance diagram for Date:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($date)
 toStamp ()
 toDate ($delimiter= '-')
 getYear ()
 getMonth ()
 getDay ()
 getWeek ()
 getWeekDay ()
 spawn ($modification=null)
 
Returns:
Date

 modify ($string)
 
Exceptions:
WrongArgumentException 

 getDayStartStamp ()
 getDayEndStamp ()
 getFirstDayOfWeek ($weekStart=Date::WEEKDAY_MONDAY)
 
Returns:
Date

 getLastDayOfWeek ($weekStart=Date::WEEKDAY_MONDAY)
 
Returns:
Date

 toString ()
 toDialectString (Dialect $dialect)
 toISOString ()
 ISO 8601 date string.

Static Public Member Functions

static create ($date)
 
Returns:
Date

static today ($delimiter= '-')
static makeToday ()
 
Returns:
Date

static makeFromWeek ($weekNumber, $year=null)
 
Returns:
Date

static dayDifference (Date $left, Date $right)
static compare (Date $left, Date $right)

Public Attributes

const WEEKDAY_MONDAY = 1
const WEEKDAY_TUESDAY = 2
const WEEKDAY_WEDNESDAY = 3
const WEEKDAY_THURSDAY = 4
const WEEKDAY_FRIDAY = 5
const WEEKDAY_SATURDAY = 6
const WEEKDAY_SUNDAY = 0

Protected Member Functions

 import ($string)
 stringImport ($string)

Static Protected Member Functions

static getFormat ()

Protected Attributes

 $string = null
 $int = null
 $year = null
 $month = null
 $day = null


Detailed Description

Date's container and utilities.

See also:
DateRange

Definition at line 21 of file Date.class.php.


Constructor & Destructor Documentation

Date::__construct ( date  ) 

Definition at line 110 of file Date.class.php.

References getFormat(), and stringImport().

Here is the call graph for this function:


Member Function Documentation

static Date::create ( date  )  [static]

Returns:
Date

Reimplemented in Timestamp, and CalendarDay.

Definition at line 41 of file Date.class.php.

Referenced by CalendarMonthWeekly::__construct().

static Date::today ( delimiter = '-'  )  [static]

Definition at line 46 of file Date.class.php.

static Date::makeToday (  )  [static]

Returns:
Date

Reimplemented in Timestamp.

Definition at line 54 of file Date.class.php.

Referenced by DateUtils::getAgeByBirthDate(), and RussianTextUtils::getHumanDay().

static Date::makeFromWeek ( weekNumber,
year = null 
) [static]

Returns:
Date

Definition at line 62 of file Date.class.php.

References $year, and Assert::isTrue().

Here is the call graph for this function:

static Date::dayDifference ( Date left,
Date right 
) [static]

Definition at line 87 of file Date.class.php.

References getDay(), getMonth(), and getYear().

Here is the call graph for this function:

static Date::compare ( Date left,
Date right 
) [static]

Definition at line 102 of file Date.class.php.

Referenced by RussianTextUtils::getDateAsText().

Date::toStamp (  ) 

Definition at line 127 of file Date.class.php.

Referenced by PrimitiveDate::checkRanges(), and RussianTextUtils::getDateAsText().

Date::toDate ( delimiter = '-'  ) 

Definition at line 132 of file Date.class.php.

Referenced by CalendarWeek::addDay(), CalendarMonthWeekly::setSelected(), and Timestamp::toDateTime().

Date::getYear (  ) 

Definition at line 142 of file Date.class.php.

Referenced by dayDifference(), and DateUtils::getAgeByBirthDate().

Date::getMonth (  ) 

Definition at line 147 of file Date.class.php.

Referenced by dayDifference().

Date::getDay (  ) 

Definition at line 152 of file Date.class.php.

Referenced by dayDifference(), and RussianTextUtils::getHumanDay().

Date::getWeek (  ) 

Definition at line 157 of file Date.class.php.

Date::getWeekDay (  ) 

Definition at line 162 of file Date.class.php.

Referenced by getFirstDayOfWeek(), and getLastDayOfWeek().

Date::spawn ( modification = null  ) 

Returns:
Date

Definition at line 170 of file Date.class.php.

Referenced by getFirstDayOfWeek(), and getLastDayOfWeek().

Date::modify ( string  ) 

Exceptions:
WrongArgumentException 

Returns:
Date

Definition at line 184 of file Date.class.php.

References $string, and getFormat().

Referenced by DateRange::split().

Here is the call graph for this function:

Date::getDayStartStamp (  ) 

Reimplemented in Timestamp.

Definition at line 206 of file Date.class.php.

Date::getDayEndStamp (  ) 

Definition at line 217 of file Date.class.php.

Date::getFirstDayOfWeek ( weekStart = Date::WEEKDAY_MONDAY  ) 

Returns:
Date

Definition at line 231 of file Date.class.php.

References getWeekDay(), and spawn().

Here is the call graph for this function:

Date::getLastDayOfWeek ( weekStart = Date::WEEKDAY_MONDAY  ) 

Returns:
Date

Definition at line 241 of file Date.class.php.

References getWeekDay(), and spawn().

Here is the call graph for this function:

Date::toString (  ) 

Implements Stringable.

Definition at line 248 of file Date.class.php.

Referenced by toDialectString(), and toISOString().

Date::toDialectString ( Dialect dialect  ) 

Implements DialectString.

Definition at line 253 of file Date.class.php.

References Dialect::quoteValue(), and toString().

Here is the call graph for this function:

Date::toISOString (  ) 

ISO 8601 date string.

Definition at line 262 of file Date.class.php.

References toString().

Here is the call graph for this function:

static Date::getFormat (  )  [static, protected]

Reimplemented in Timestamp.

Definition at line 267 of file Date.class.php.

Referenced by __construct(), modify(), and stringImport().

Date::import ( string  )  [protected]

Reimplemented in Timestamp.

Definition at line 272 of file Date.class.php.

References $string.

Date::stringImport ( string  )  [protected]

Reimplemented in Timestamp.

Definition at line 294 of file Date.class.php.

References $string, and getFormat().

Referenced by __construct().

Here is the call graph for this function:


Member Data Documentation

const Date::WEEKDAY_MONDAY = 1

Definition at line 23 of file Date.class.php.

const Date::WEEKDAY_TUESDAY = 2

Definition at line 24 of file Date.class.php.

const Date::WEEKDAY_WEDNESDAY = 3

Definition at line 25 of file Date.class.php.

const Date::WEEKDAY_THURSDAY = 4

Definition at line 26 of file Date.class.php.

const Date::WEEKDAY_FRIDAY = 5

Definition at line 27 of file Date.class.php.

const Date::WEEKDAY_SATURDAY = 6

Definition at line 28 of file Date.class.php.

const Date::WEEKDAY_SUNDAY = 0

Definition at line 29 of file Date.class.php.

Date::$string = null [protected]

Definition at line 31 of file Date.class.php.

Referenced by Timestamp::import(), import(), modify(), Timestamp::stringImport(), and stringImport().

Date::$int = null [protected]

Definition at line 32 of file Date.class.php.

Date::$year = null [protected]

Definition at line 34 of file Date.class.php.

Referenced by makeFromWeek().

Date::$month = null [protected]

Definition at line 35 of file Date.class.php.

Date::$day = null [protected]

Definition at line 36 of file Date.class.php.


The documentation for this class was generated from the following file:
Generated on Sun Dec 9 21:57:12 2007 for onPHP by  doxygen 1.5.4