You are here

function date_get_format_types in Date 6.2

Get the list of available date format types and attributes.

Parameters

$type: The format type, e.g. 'short', 'medium', 'long', 'custom'. If empty, then all attributes for that type will be returned.

$reset: Whether or not to reset this function's internal cache (defaults to FALSE).

Return value

Array of date format types.

10 calls to date_get_format_types()
date_api_date_format_form_elements in ./date_api.admin.inc
Add drop down selects for date format types.
date_api_delete_format_type_form in ./date_api.admin.inc
Menu callback; present a form for deleting a date format type.
date_api_delete_format_type_form_submit in ./date_api.admin.inc
Delete a configured date format type.
date_date_time_settings_validate in date/date.module
Validate new date format type details.
date_field_formatter_info in date/date.module
Implementation of hook_field_formatter_info().

... See full list

File

./date_api.module, line 1932
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_get_format_types($type = NULL, $reset = FALSE) {
  static $_date_format_types;
  if ($reset || !isset($_date_format_types)) {
    $_date_format_types = _date_format_types_build();
  }
  return $type ? isset($_date_format_types[$type]) ? $_date_format_types[$type] : FALSE : $_date_format_types;
}