function smarty_modifier_date_format($string,
$format=null,
$default_date='',
$formatter='auto'
){ if ($format === null
) { $format = Smarty::
$_DATE_FORMAT;
} /**
* Include the {@link shared.make_timestamp.php} plugin
*/
require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php'
);
if ($string != '' &&
$string != '0000-00-00' &&
$string != '0000-00-00 00:00:00'
) { $timestamp =
smarty_make_timestamp($string);
} elseif ($default_date != ''
) { $timestamp =
smarty_make_timestamp($default_date);
} else { return;
} if($formatter=='strftime'||
($formatter=='auto'&&
strpos($format,'%'
)!==false
)) { if (DS == '\\'
) { $_win_from = array
('%D', '%h', '%n', '%r', '%R', '%t', '%T'
);
$_win_to = array
('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S'
);
if (strpos($format, '%e'
) !== false
) { $_win_from[] = '%e';