PageRenderTime 44ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/engines/smarty/plugins/modifier.strftime.php

https://bitbucket.org/Balancer/bors-core
PHP | 12 lines | 10 code | 2 blank | 0 comment | 3 complexity | 57fe8b944b6308c2c13945a8aff38dc4 MD5 | raw file
Possible License(s): LGPL-2.1, GPL-3.0
  1. <?php
  2. function smarty_modifier_strftime($time, $mask)
  3. {
  4. if($time == 0)
  5. $time = $GLOBALS['now'];
  6. if(!preg_match("!^\d+$!", $time))
  7. return $time;
  8. return strftime($mask, $time);
  9. }
  10. ?>