Utilities for playing with dates and time. More...
Static Public Member Functions | |
static | getAgeByBirthDate (Date $birthDate, $actualDate=null) |
static | makeFirstDayOfMonth (Date $date) |
static | makeLastDayOfMonth (Date $date) |
static | makeDatesListByRange (DateRange $range, IntervalUnit $unit, $hash=true) |
static | alignToSeconds (Timestamp $stamp, $seconds) |
Utilities for playing with dates and time.
Definition at line 17 of file DateUtils.class.php.
static DateUtils::alignToSeconds | ( | Timestamp $ | stamp, | |
$ | seconds | |||
) | [static] |
Definition at line 89 of file DateUtils.class.php.
References Timestamp::create(), and Date::toStamp().
static DateUtils::getAgeByBirthDate | ( | Date $ | birthDate, | |
$ | actualDate = null | |||
) | [static] |
Definition at line 19 of file DateUtils.class.php.
References Date::getDay(), Date::getMonth(), Date::getYear(), Assert::isInstance(), and Date::makeToday().
static DateUtils::makeDatesListByRange | ( | DateRange $ | range, | |
IntervalUnit $ | unit, | |||
$ | hash = true | |||
) | [static] |
Definition at line 61 of file DateUtils.class.php.
References Date::create(), DateRange::getEnd(), IntervalUnit::getName(), DateRange::getStart(), and IntervalUnit::truncate().
static DateUtils::makeFirstDayOfMonth | ( | Date $ | date | ) | [static] |
Definition at line 45 of file DateUtils.class.php.
References Timestamp::create(), Date::getMonth(), and Date::getYear().
static DateUtils::makeLastDayOfMonth | ( | Date $ | date | ) | [static] |
Definition at line 53 of file DateUtils.class.php.
References Timestamp::create(), Date::getMonth(), and Date::getYear().