function date_default_format in Date 7
Same name and namespace in other branches
- 6.2 date/date.module \date_default_format()
- 7.3 date.module \date_default_format()
- 7.2 date.module \date_default_format()
3 calls to date_default_format()
- DateFieldTestCase::createDateField in tests/
date_field.test - Create a date field from an array of settings values. All values have defaults, only need to specify values that need to be different.
- date_field_widget_info in ./
date.field.inc - Implements hook_field_widget_info().
- date_tools_wizard_build in date_tools/
date_tools.wizard.inc
File
- ./
date.module, line 120
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;
}