You are here

function DateSqlHandler::format_help in Date 8

Converts a format string into help text, i.e. 'Y-m-d' becomes 'YYYY-MM-DD'.

Parameters

string $format: A date format string.

Return value

string The conveted help text.

File

date_api/lib/Drupal/date_api/DateSqlHandler.php, line 779

Class

DateSqlHandler
A class to manipulate date SQL.

Namespace

Drupal\date_api

Code

function format_help($format) {
  $replace = array(
    'Y' => 'YYYY',
    'm' => 'MM',
    'd' => 'DD',
    'H' => 'HH',
    'i' => 'MM',
    's' => 'SS',
    '\\T' => 'T',
  );
  return strtr($format, $replace);
}