Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0a4

Bug #969 Dates created from a string don't set properties correctly
Submitted: 2004-03-08 05:30 UTC
From: redbeard at mdjohnson dot us Assigned: pajoye
Status: Closed Package: Date
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 26 + 44 = ?

 
 [2004-03-08 05:30 UTC] redbeard at mdjohnson dot us
Description: ------------ When creating a date from a string, the various properties (year, month, day, etc) are set to strings instead of integers. This results in calls to the access methods (e.g. getDay()) to return strings, which can result in incorrect output. Reproduce code: --------------- $d = new Date('2004-01-01'); echo $d->getDay(); Expected result: ---------------- 1 Actual result: -------------- 01

Comments

 [2004-03-12 11:24 UTC] pajoye
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better. Will be "fixed" in the next release. thanks, pierre