/engines/smarty/plugins/modifier.strftime.php
PHP | 12 lines | 10 code | 2 blank | 0 comment | 3 complexity | 57fe8b944b6308c2c13945a8aff38dc4 MD5 | raw file
Possible License(s): LGPL-2.1, GPL-3.0
- <?php
- function smarty_modifier_strftime($time, $mask)
- {
- if($time == 0)
- $time = $GLOBALS['now'];
-
- if(!preg_match("!^\d+$!", $time))
- return $time;
- return strftime($mask, $time);
- }
- ?>