function webform_date_format in Webform 6.2
Same name and namespace in other branches
- 5.2 components/date.inc \webform_date_format()
- 6.3 webform.module \webform_date_format()
- 7.4 webform.module \webform_date_format()
- 7.3 webform.module \webform_date_format()
Get a date format according to the site settings.
Parameters
$size: A choice of 'short', 'medium', or 'long' date formats.
3 calls to webform_date_format()
- theme_webform_mail_date in components/
date.inc - Format the output of emailed data for this component
- _webform_csv_data_date in components/
date.inc - Return the result of a textfield submission. The output of this function will be displayed under the "results" tab then "submissions".
- _webform_table_data_date in components/
date.inc - Return the result of this component's submission for display in a table. The output of this function will be displayed under the "results" tab then "table".
File
- components/
date.inc, line 456 - Webform module date component.
Code
function webform_date_format($size = 'medium') {
// Format date according to site's given format.
$format = variable_get('date_format_' . $size, 'D, m/d/Y - H:i');
$time = 'aABgGhHisueIOPTZ';
$day_of_week = 'Dlw';
$special = ',-: ';
return trim($format, $time . $day_of_week . $special);
}