function clock_get_date_format in Clock 6
Same name and namespace in other branches
- 7.2 clock.module \clock_get_date_format()
Gets the correct date format.
Return value
A date format string. See http://php.net/date for more information.
1 call to clock_get_date_format()
- clock_block in ./
clock.module - Implements hook_block().
File
- ./
clock.module, line 243 - Functions to manage the display of a clock.
Code
function clock_get_date_format() {
$date_format_type = variable_get('clock_date_format_type', 'short');
switch ($date_format_type) {
case 'short':
$date_format = variable_get('date_format_short', 'd/m/Y - H:i');
break;
case 'medium':
$date_format = variable_get('date_format_medium', 'l, m/d/Y, g:i a');
break;
case 'long':
$date_format = variable_get('date_format_long', 'l, Y, F j - H:i');
break;
case 'custom':
$date_format = variable_get('clock_custom_date_format', 'g:i a');
break;
}
return $date_format;
}