hook_date_format_types
- Versions
- 7
hook_date_format_types()
Defines additional date types.
Next to the 'long', 'medium' and 'short' date types defined in core, any module can define additional types that can be used when displaying dates. A date type is a key which can be passed to format_date() to return a date in the configured display format.
To avoid namespace collisions with date types defined by other modules, it is recommended that each date type starts with the module name. A date type can consist of letters, numbers and underscores.
See also
@see format_date()
Return value
A list of date types in 'key' => 'label' format.
Related topics
Code
modules/system/system.api.php, line 2600
<?php
function hook_date_format_types() {
return array(
'long' => t('Long'),
'medium' => t('Medium'),
'short' => t('Short'),
);
}
?>Login or register to post comments 