You are here

function date_type_format in Date 5.2

Same name and namespace in other branches
  1. 8 date_api/date_api.module \date_type_format()
  2. 6.2 date_api.module \date_type_format()
  3. 6 date_api.module \date_type_format()
  4. 7.3 date_api/date_api.module \date_type_format()
  5. 7 date_api/date_api.module \date_type_format()
  6. 7.2 date_api/date_api.module \date_type_format()

Helper function for getting the format string for a date type.

4 calls to date_type_format()
date_combo_validate in date/date_elements.inc
Validate and update a combo element. Don't try this if there were errors before reaching this point.
date_copy_convert_events in date_copy/date_copy.module
date_prepare_node in date/date.module
Helper function to adapt multiple date fields on a node to view parameters.
date_repeat_build_dates in date/date_repeat.inc
Helper function to build repeating dates from a $node_field.

File

./date_api.module, line 55
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;
  }
}