function date_type_format in Date 6
Same name and namespace in other branches
- 8 date_api/date_api.module \date_type_format()
- 5.2 date_api.module \date_type_format()
- 6.2 date_api.module \date_type_format()
- 7.3 date_api/date_api.module \date_type_format()
- 7 date_api/date_api.module \date_type_format()
- 7.2 date_api/date_api.module \date_type_format()
Helper function for getting the format string for a date type.
3 calls to date_type_format()
- date_combo_validate in date/
date_elements.inc - Validate and update a combo element. Don't try this if there were errors before reaching this point.
- date_copy_convert_events in date_copy/
date_copy.module - _date_repeat_widget_validate in date/
date_repeat.inc - Validation for date repeat form element.
File
- ./
date_api.module, line 48 - This module will make the date API available to other modules. Designed to provide a light but flexible assortment of functions and constants, with more functionality in additional files that are not loaded unless other modules specifically include them.
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;
}
}