function system_get_date_format

Gets the format details for a particular format ID.

Parameters

$dfid: A date format ID.

Return value

A date format object with the following properties:

  • dfid: The date format ID.
  • format: The date format string.
  • type: The name of the date type.
  • locked: Whether the date format can be changed or not.
3 calls to system_get_date_format()
system_configure_date_formats_form in drupal/modules/system/system.admin.inc
Allow users to add additional date formats.
system_date_delete_format_form in drupal/modules/system/system.admin.inc
Menu callback; present a form for deleting a date format.
system_date_delete_format_form_submit in drupal/modules/system/system.admin.inc
Delete a configured date format.

File

drupal/modules/system/system.module, line 3663
Configuration system that lets administrators modify the workings of the site.

Code

function system_get_date_format($dfid) {
  return db_query('SELECT df.dfid, df.format, df.type, df.locked FROM {date_formats} df WHERE df.dfid = :dfid', array(
    ':dfid' => $dfid,
  ))
    ->fetch();
}