1.20.x 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
- includes/
date.inc, line 53 - Date API functions and constants.
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;
}