function _classified_get_date_from_timestamp in Classified Ads 6.3
Same name and namespace in other branches
- 7.3 classified.module \_classified_get_date_from_timestamp()
Convert a UNIX timestamp to the format used by the date widget.
Note that this is a one-way conversion: hour/minute/second information is lost in the conversion.
Parameters
int $ts: A UNIX timestamp.
Return value
array Or NULL for The Epoch ($ts == 0).
See also
_classified_timestamp_from_date()
1 call to _classified_get_date_from_timestamp()
- classified_form in ./
classified.module - Implements hook_form().
File
- ./
classified.module, line 279 - A pure D6 classified ads module inspired by the ed_classified module.
Code
function _classified_get_date_from_timestamp($ts) {
$getdate = getdate($ts);
$ret = $ts ? array(
'day' => $getdate['mday'],
'month' => $getdate['mon'],
'year' => $getdate['year'],
) : NULL;
return $ret;
}