Source for file modifier.strftime.php

Documentation is available at modifier.strftime.php

  1. <?php
  2. /**
  3.  *  smarty modifier:strftime()
  4.  *
  5.  *  strftime()関数のwrapper
  6.  *
  7.  *  sample:
  8.  *  <code>
  9.  *  {"2004/01/01 01:01:01"|strftime:"%Y年%m月%d日"}
  10.  *  </code>
  11.  *  <code>
  12.  *  2004年01月01日
  13.  *  </code>
  14.  *
  15.  *  @param  string  $string フォーマット対象文字列
  16.  *  @param  string  $format 書式指定文字列(strftime()関数参照)
  17.  *  @return string  フォーマット済み文字列
  18.  */
  19. function smarty_modifier_strftime($string$format)
  20. {
  21.     if ($string === "" || $string == null{
  22.         return "";
  23.     }
  24.     return strftime($formatstrtotime($string));
  25. }

Documentation generated on Fri, 11 Nov 2011 03:58:45 +0900 by phpDocumentor 1.4.3