1 date.inc | date_type_format($type) |
Helper function for getting the format string for a date type.
Parameters
string $type: A date type format name.
Return value
string: A date type format, like 'Y-m-d H:i:s'.
File
- core/
includes/ date.inc, line 54 - Date API functions.
Code
function date_type_format($type) {
switch ($type) {
case DATE_ISO:
return DATE_FORMAT_ISO;
case DATE_UNIX:
return DATE_FORMAT_UNIX;
case DATE_DATETIME:
return DATE_FORMAT_DATETIME;
case DATE_ICAL:
return DATE_FORMAT_ICAL;
}
return FALSE;
}