Get an array representation of this date with the keys as numbers.
The values of the array are strings with leading zeros.
string getFormatted(
mixed
$format, [mixed
$local = false])
|
|
Get this dateg formatted according to string.
If the $local parameter is false, this date will be used as a GMT date, otherwise it will represent a local date.
For a description of format strings please refer to the documentation of the PHP function date().
Note: Currently this method does not check for boundaries. If this date is out of range for a unix timestamp, the overflow will produce unexpected results.
Get an array representation of this date with the keys as strings.
- array( 'year' => YYYY,
- 'month' => MM,
- 'day' => DD,
- 'hour' => hh,
- 'minute' => mm,
- 'second' => ss )
integer getUnix(
[boolean
$local = false])
|
|
Return this date as a Unix timestamp.
If the $local parameter is false, this date will be used as a GMT date, otherwise it will represent a local date.
Parameters:
boolean setArray(
mixed
$array)
|
|
Initialize this date with an array.
The array may be an array as returned by getArray() or getNamedArray(). The method returns false on error or if the date is not valid.
boolean setSQL(
string
$date)
|
|
Initialize this date with an SQL DATETIME string.
Format: 'YYYY-MM-DD HH:mm:ss'
The method returns false on error or if the date is not valid.
Parameters:
boolean setUnix(
[integer
$time = 0])
|
|
Set the internal timestamp of this to the given unix time or initialize with current time if no time is given.
The method returns false on error or if the date is not valid.
Parameters: