Add a link to password documentation.
[platal.git] / plugins / modifier.date_format.php
index 78b6d24..7714f16 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -27,6 +27,8 @@ function smarty_modifier_date_format($string, $format = '%x', $default_date=null
 
     if (preg_match('/^\d{14}$/', $d)) {
         $t = mktime(substr($d,8,2), substr($d,10,2), substr($d,12,2), substr($d,4,2), substr($d,6,2), substr($d,0,4));
+    } elseif (preg_match('/^\d{8}$/', $d)) {
+        $t = mktime(0, 0, 0, substr($d,4,2), substr($d,6,2), substr($d,0,4));
     } elseif (is_numeric($d)) {
         $t = intval($d);
     } else {
@@ -42,4 +44,5 @@ function smarty_modifier_date_format($string, $format = '%x', $default_date=null
     }
 }
 
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
 ?>