1: <?php
2: /**
3: *
4: * @package Legacy
5: * @version $Id: modifier.xoops_date_format.php,v 1.3 2008/09/25 15:12:36 kilica Exp $
6: * @copyright Copyright 2005-2007 XOOPS Cube Project <https://github.com/xoopscube/legacy>
7: * @license https://github.com/xoopscube/legacy/blob/master/docs/GPL_V2.txt GNU GENERAL PUBLIC LICENSE Version 2
8: *
9: */
10:
11: /*
12: * Smarty plugin
13: * -------------------------------------------------------------
14: * Type: modifier
15: * Name: xoops_date_format
16: * Purpose: format datestamps via strftime ( use xoops timestamp )
17: * Input: time: input date unixtime
18: * format: strftime format for output
19: * -------------------------------------------------------------
20: */
21: function smarty_modifier_xoops_date_format($time, $format="%b %e, %Y")
22: {
23: if($time && is_numeric($time)) {
24: return strftime ( $format, xoops_getUserTimestamp ( $time ) );
25: }
26: return;
27: }
28:
29: ?>
30: