public function FrxControls::drupal_date_format in Forena Reports 7.2
Same name and namespace in other branches
- 6.2 plugins/FrxControls.inc \FrxControls::drupal_date_format()
- 6 plugins/FrxControls.inc \FrxControls::drupal_date_format()
- 7 plugins/FrxControls.inc \FrxControls::drupal_date_format()
- 7.3 plugins/FrxControls.inc \FrxControls::drupal_date_format()
- 7.4 plugins/FrxControls.inc \FrxControls::drupal_date_format()
1 call to FrxControls::drupal_date_format()
- FrxControls::iso_date in plugins/
FrxControls.inc
File
- plugins/
FrxControls.inc, line 68 - contains various methods for extending report formating, layout, transformation and design.
Class
- FrxControls
- @file contains various methods for extending report formating, layout, transformation and design.
Code
public function drupal_date_format($value, $format_str, $teng) {
if (!$format_str) {
$format_str = 'small';
}
switch ($format_str) {
case 'medium':
$type = $format_str;
$format = '';
break;
case 'small':
$type = $format_str;
$format = '';
break;
case 'large':
$type = $format_str;
$format = '';
break;
default:
$type = 'custom';
$format = $format_str;
}
if ($value) {
$value = function_exists('format_date') ? format_date($value, $type, $format) : date($format, $value);
}
return $value;
}