views_date_format_sql.module in Views Date Format SQL 7.3
File
views_date_format_sql.module
View source
<?php
function views_date_format_sql_views_api() {
return array(
'api' => 3,
);
}
function _views_date_format_sql_get_date_format($type = 'medium', $format = '') {
switch ($type) {
case 'short':
$format = variable_get('date_format_short', 'm/d/Y - H:i');
break;
case 'long':
$format = variable_get('date_format_long', 'l, F j, Y - H:i');
break;
case 'custom':
break;
case 'medium':
default:
if ($type != 'medium') {
$format = variable_get('date_format_' . $type, '');
}
if ($format === '') {
$format = variable_get('date_format_medium', 'D, m/d/Y - H:i');
}
break;
}
return $format;
}