Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes

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)
 modify ($string)
 getDayStartStamp ()
 getDayEndStamp ()
 getFirstDayOfWeek ($weekStart=Date::WEEKDAY_MONDAY)
 getLastDayOfWeek ($weekStart=Date::WEEKDAY_MONDAY)
 toString ()
 toDialectString (Dialect $dialect)
 toIsoString ()
 ISO 8601 date string.
 toTimestamp ()

Static Public Member Functions

static create ($date)
static today ($delimiter= '-')
static makeToday ()
static makeFromWeek ($weekNumber, $year=null)
static dayDifference (Date $left, Date $right)
static compare (Date $left, Date $right)
static getWeekCountInYear ($year)

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)
 buildInteger ()

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 124 of file Date.class.php.

References buildInteger(), getFormat(), and stringImport().

Here is the call graph for this function:


Member Function Documentation

Date::buildInteger (  )  [protected]

Reimplemented in Timestamp.

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

Referenced by __construct().

static Date::compare ( Date left,
Date right 
) [static]
static Date::create ( date  )  [static]
Returns:
Date

Reimplemented in Timestamp, and CalendarDay.

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

Referenced by IntervalUnit::countInRange(), DateUtils::makeDatesListByRange(), and toTimestamp().

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

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

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

Referenced by IntervalUnit::countInRange(), and IntervalUnit::truncate().

Here is the call graph for this function:

Date::getDay (  ) 
Date::getDayEndStamp (  ) 

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

Date::getDayStartStamp (  ) 

Reimplemented in Timestamp.

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

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

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

References getWeekDay(), and spawn().

Here is the call graph for this function:

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

Reimplemented in Timestamp.

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

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

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

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

References getWeekDay(), and spawn().

Here is the call graph for this function:

Date::getMonth (  ) 
Date::getWeek (  ) 

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

static Date::getWeekCountInYear ( year  )  [static]

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

References $year.

Referenced by makeFromWeek().

Date::getWeekDay (  ) 

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

Referenced by getFirstDayOfWeek(), and getLastDayOfWeek().

Date::getYear (  ) 
Date::import ( string  )  [protected]

Reimplemented in Timestamp.

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

References $string.

static Date::makeFromWeek ( weekNumber,
year = null 
) [static]
Returns:
Date
See also:
http://www.faqs.org/rfcs/rfc3339.html
http://www.cl.cam.ac.uk/~mgk25/iso-time.html

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

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

Here is the call graph for this function:

static Date::makeToday (  )  [static]
Returns:
Date

Reimplemented in Timestamp.

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

References today().

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

Here is the call graph for this function:

Date::modify ( string  ) 
Exceptions:
WrongArgumentException 
Returns:
Date

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

References $string, and getFormat().

Referenced by DateRange::split().

Here is the call graph for this function:

Date::spawn ( modification = null  ) 
Returns:
Date

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

Referenced by getFirstDayOfWeek(), getLastDayOfWeek(), and IntervalUnit::truncate().

Date::stringImport ( string  )  [protected]

Reimplemented in Timestamp.

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

References $string, and getFormat().

Referenced by __construct().

Here is the call graph for this function:

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

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

Referenced by Timestamp::makeToday(), and makeToday().

Date::toDialectString ( Dialect dialect  ) 

Implements DialectString.

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

References toString().

Here is the call graph for this function:

Date::toIsoString (  ) 

ISO 8601 date string.

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

References toString().

Here is the call graph for this function:

Date::toStamp (  ) 
Date::toString (  ) 

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

Referenced by toDialectString(), and toIsoString().

Date::toTimestamp (  ) 
Returns:
Timestamp

Reimplemented in Timestamp.

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

References create(), and toStamp().

Referenced by IntervalUnit::truncate().

Here is the call graph for this function:


Member Data Documentation

Date::$day = null [protected]

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

Date::$int = null [protected]

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

Date::$month = null [protected]

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

Date::$string = null [protected]
Date::$year = null [protected]

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

Referenced by getWeekCountInYear(), and makeFromWeek().

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

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

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

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

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

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

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


The documentation for this class was generated from the following file: