function date_type_format in Date 7
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()
- 6 date_api.module \date_type_format()
- 7.3 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.
5 calls to date_type_format()
- date_combo_validate in ./
date_elements.inc - Validate and update a combo element. Don't try this if there were errors before reaching this point.
- date_field_validate in ./
date.field.inc - Implements hook_field_validate().
- date_prepare_entity in ./
date.module - Helper function to adapt entity date fields to formatter settings.
- date_repeat_build_dates in ./
date_repeat.inc - Helper function to build repeating dates from a $node_field.
- date_token_values in ./
date_token.inc
File
- date_api/
date_api.module, line 720 - 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;
}
}