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