hook_date_format_types

Versions
mediamosa-21
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

hook_date_formats()

@see format_date()

Return value

A list of date types in 'key' => 'label' format.

Related topics

Code

modules/system/system.api.php, line 2796

<?php
function hook_date_format_types() {
  return array(
    'long' => t('Long'),
    'medium' => t('Medium'),
    'short' => t('Short'),
  );
}
?>