ID:               48424
 Updated by:       [email protected]
 Reported By:      php at qrs dot oib dot com
 Status:           Bogus
 Bug Type:         Date/time related
 Operating System: *
 PHP Version:      5.*, 6CVS (2009-05-29)
 New Comment:

So, fix the parser.  Why would "July 17, 2004" pick up the year while
"17 July, 2004" doesn't?


Previous Comments:
------------------------------------------------------------------------

[2009-05-29 12:48:57] [email protected]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

THis is how the parser works, check with var_dump(date_parse("17 July,
2004"));

------------------------------------------------------------------------

[2009-05-29 04:36:35] php at qrs dot oib dot com

Description:
------------
strtotime changes the year to the current year with a date formatted
like "17 July, 2004".

Reproduce code:
---------------
print strftime("%d %B, %Y", strtotime("July 17, 2004"));
print strftime("%d %B, %Y", strtotime("17 July, 2004")); // <---
print strftime("%d %B, %Y", strtotime("17 July 2004"));

Expected result:
----------------
17 July, 2004
17 July, 2004
17 July, 2004

Actual result:
--------------
17 July, 2004
17 July, 2009
17 July, 2004


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48424&edit=1

Reply via email to