Return an structured array holding the differences between 2 dates.
The returned array will be structured as follows: Array ( [d] => _numeric_day_value_ [h] => _numeric_hour_value_ [m] => _numeric_minute_value_ [s] => _numeric_second_value_ )
Tags:
return:
The structured array containing the datetime difference
float getDatetimeDiff_AsField(
date1
$date1, date2
$date2, field
$field)
Return an field holding the differences between 2 dates expressed in units of the field requested
Since the date fields can change depending on the date format, the following convention is used when referring to date fields: Field 1 -> Year Field 2 -> Month Field 3 -> Day Field 4 -> Hour Field 5 -> Minute Field 6 -> Second
string getDatetime_Field(
datetime
$datetime, field
$field)
Return the requested field from the supplied date
Since the date fields can change depending on the date format, the following convention is used when referring to date fields: Field 1 -> Year Field 2 -> Month Field 3 -> Day Field 4 -> Hour Field 5 -> Minute Field 6 -> Second
create a unix timestamp from either a unix timestamp (sic!), a MySQL timestamp or a string. This code is taken from smarty_make_timestamp.php, credits go to Monte Ohrt <monte at ohrt dot com>
We use a copy of the code here due to performance reasons.
Tags:
return:
a unix timestamp
Parameters:
int
$string
or text a timestamp in one of the formats mentioned