bug 290, enlever le 0 dans la date de deces
authorPascal Corpet <pascal.corpet@m4x.org>
Mon, 18 Apr 2005 22:29:47 +0000 (22:29 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:41 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-575

ChangeLog
plugins/modifier.date_format.php

index ae42aa0..d090889 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -11,6 +11,8 @@ New :
 
 Bug/Wish :
 
+       * Misc :
+               - #290: date display with no preceding 0.                                                       -Car
 
 Fixes (from 0.9.5 branch) :
 
index 66211d7..7a7c5d4 100644 (file)
@@ -23,7 +23,7 @@ function smarty_modifier_date_format($string, $format = '%x', $default_date=null
 {
     $d = empty($string) ? $default_date : $string;
     if (empty($format) || preg_match('/^[ 0\-]*$/', $d)) return;
-    $f = str_replace('%X', '%T', str_replace('%x', '%d %B %Y', $format));
+    $f = str_replace('%X', '%T', str_replace('%x', '%e %B %Y', $format));
 
     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));