9 * Include the {@link shared.make_timestamp.php} plugin
11 require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
13 * Smarty date_format modifier plugin
16 * Name: date_format<br>
17 * Purpose: format datestamps via strftime<br>
19 * - string: input date string
20 * - format: strftime format for output
21 * - default_date: default date if $string is empty
22 * @link http://smarty.php.net/manual/en/language.modifier.date.format.php
23 * date_format (Smarty online manual)
28 * @uses smarty_make_timestamp()
30 function smarty_modifier_date_format($string, $format="%b %e, %Y", $default_date=null)
33 return strftime($format, smarty_make_timestamp($string));
34 } elseif (isset($default_date) && $default_date != '') {
35 return strftime($format, smarty_make_timestamp($default_date));
41 /* vim: set expandtab: */