Date
Please note: This page is under construction and has not been finished yet.
$gen = e107::getDate();
Calculate difference between two dates for display in terms of years/months/weeks....
$gen->computeLapse($older_date, $newer_date = FALSE, $mode = FALSE, $show_secs = TRUE, $format = 'long')
Parameter | Type | Description | Mandatory? |
---|---|---|---|
older_date | integer | UNIX timestamp | Yes |
newer_date | integer | UNIX timestamp Default: current time | No |
mode | boolean | if true return value is an array. Otherwise return value is a string Default: false | No |
show_secs | boolean | Default: true | No |
format | string | Format of the human readable date. Options:
Default: long | No |
Convert datestamp to human readable date. System time offset is considered.
$gen->convert_date($datestamp, $mask = '')
Parameter | Type | Description | Mandatory? |
---|---|---|---|
datestamp | integer | UNIX timestamp | Yes |
mask | string | Format of the human readable date. Options:
Default: long | No |
The configuration of the mask formats are specified in Admin Area > Preferences > Date Display options.
👉
Return an array of language terms representing months
$gen->terms($type='month')
Parameter | Type | Description | Mandatory? |
---|---|---|---|
type | string | Options:
Default: month | Yes |
Last modified 1yr ago