From: Pascal Corpet Date: Mon, 18 Apr 2005 22:29:47 +0000 (+0000) Subject: bug 290, enlever le 0 dans la date de deces X-Git-Tag: xorg/old~187 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=980d9d10b6176460db79055968f97d44dae97e67;p=platal.git bug 290, enlever le 0 dans la date de deces git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-575 --- diff --git a/ChangeLog b/ChangeLog index ae42aa0..d090889 100644 --- 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) : diff --git a/plugins/modifier.date_format.php b/plugins/modifier.date_format.php index 66211d7..7a7c5d4 100644 --- a/plugins/modifier.date_format.php +++ b/plugins/modifier.date_format.php @@ -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));