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 modules/system/system.admin.inc
Allow users to add additional date formats.
system_date_delete_format_form in modules/system/system.admin.inc
Menu callback; present a form for deleting a date format.
system_date_delete_format_form_submit in modules/system/system.admin.inc
Delete a configured date format.

File

modules/system/system.module, line 3683

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();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.