You are here

function date_format_type_options in Date 7.3

Same name and namespace in other branches
  1. 8 date_api/date_api.module \date_format_type_options()
  2. 7 date_api/date_api.module \date_format_type_options()
  3. 7.2 date_api/date_api.module \date_format_type_options()

Creates an array of date format types for use as an options list.

3 calls to date_format_type_options()
date_default_formatter_settings_form in ./date_admin.inc
Settings for the default formatter.
date_default_formatter_settings_summary in ./date_admin.inc
Settings summary for the default formatter.
date_field_diff_options_form in ./date.diff.inc
Provide a form for setting the field comparison options.

File

date_api/date_api.module, line 2873
This module will make the date API available to other modules.

Code

function date_format_type_options() {
  $options = array();
  $format_types = system_get_date_types();
  if (!empty($format_types)) {
    foreach ($format_types as $type => $type_info) {
      $options[$type] = $type_info['title'] . ' (' . date_format_date(date_example_date(), $type) . ')';
    }
  }
  return $options;
}