function facetapi_date_format in Facet API 6
Returns a formatted date based on the passed ISO date string and gap.
Parameters
$date: A string containing the date as an ISO date string.
$gap: A string containing the gap, see FACETAPI_DATE_* constants for valid values, defaults to YEAR.
Return value
A gap-appropriate display date used in the facet link.
1 call to facetapi_date_format()
- facetapi_callback_date_map in ./
facetapi.callbacks.inc - Converts date ranges to human readable dates.
File
- ./
facetapi.module, line 1246 - An abstracted facet API that can be used by various search backens.
Code
function facetapi_date_format($date, $gap = FACETAPI_DATE_YEAR) {
$timestamp = strtotime($date);
return facetapi_timestamp_format($timestamp, $gap);
}