function date_default_format in Date 6.2
Same name and namespace in other branches
- 7.3 date.module \date_default_format()
- 7 date.module \date_default_format()
- 7.2 date.module \date_default_format()
1 call to date_default_format()
- date_field_default_values in date/
date_admin.inc - Helper function to create a field array with default values for a date $field, based on field type, widget type, and timezone handling.
File
- date/
date.module, line 201 - Defines date/time field types for the Content Construction Kit (CCK).
Code
function date_default_format($type) {
if (stristr($type, 'date_popup') && module_exists('date_popup')) {
$formats = date_popup_formats();
$default_format = array_shift($formats);
}
else {
// example input formats must show all possible date parts, so add seconds.
$default_format = str_replace('i', 'i:s', variable_get('date_format_short', 'm/d/Y - H:i'));
}
return $default_format;
}