You are here

function date_sql_handler::format_help in Date 7

Same name and namespace in other branches
  1. 5.2 date_api_sql.inc \date_sql_handler::format_help()
  2. 6.2 date_api_sql.inc \date_sql_handler::format_help()
  3. 6 date_api_sql.inc \date_sql_handler::format_help()
  4. 7.3 date_api/date_api_sql.inc \date_sql_handler::format_help()
  5. 7.2 date_api/date_api_sql.inc \date_sql_handler::format_help()

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

Parameters

unknown_type $format:

Return value

unknown

File

date_api/date_api_sql.inc, line 624
SQL helper for Date API.

Class

date_sql_handler
A class to manipulate date SQL.

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