]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #26198 (strtotime() handling of M/F Y date format).
authorIlia Alshanetsky <iliaa@php.net>
Wed, 12 Nov 2003 02:58:38 +0000 (02:58 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 12 Nov 2003 02:58:38 +0000 (02:58 +0000)
NEWS
ext/standard/parsedate.y

diff --git a/NEWS b/NEWS
index c13ef048e1bf2377650683a2d8b2d0454e053e64..8f933796b1651399e688b9df06c49a63f182ad2b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ PHP 4                                                                      NEWS
 ?? ??? 2003, Version 4.3.5
 - Fixed header handler in NSAPI SAPI module (header->replace was ignored,
   send_default_content_type now sends value from php.ini). (Uwe Schindler)
+- Fixed bug #26198 (strtotime() handling of M/F Y date format). (Ilia)
 - Fixed bug #26176 (Fixed handling of numeric keys in INI files). (Ilia)
 - Fixed bug #26168 (shtool availability check in phpize). 
   (robbat2 at gentoo dot org, Ilia)
index 6fe1fb1b13971f19590e99a5c07b2a2901fc9fed..d3dd96449c85b9c243a64aab4531376b24322ecd 100644 (file)
@@ -308,7 +308,11 @@ date       : tUNUMBER '/' tUNUMBER {
        }
        | tMONTH tUNUMBER {
            ((struct date_yy *)parm)->yyMonth = $1;
-           ((struct date_yy *)parm)->yyDay = $2;
+           if ($2 > 1000) {
+               ((struct date_yy *)parm)->yyYear = $2;
+           } else {
+               ((struct date_yy *)parm)->yyDay = $2;
+           }
        }
        | tMONTH tUNUMBER ',' tUNUMBER {
            ((struct date_yy *)parm)->yyMonth = $1;
@@ -317,7 +321,11 @@ date       : tUNUMBER '/' tUNUMBER {
        }
        | tUNUMBER tMONTH {
            ((struct date_yy *)parm)->yyMonth = $2;
-           ((struct date_yy *)parm)->yyDay = $1;
+           if ($1 > 1000) {
+               ((struct date_yy *)parm)->yyYear = $1;
+           } else {
+               ((struct date_yy *)parm)->yyDay = $1;
+           }
        }
        | tUNUMBER tMONTH tUNUMBER {
            ((struct date_yy *)parm)->yyMonth = $2;