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

Bug #353 Date_Calc::beginOfNextWeek does not keep formatting
Submitted: 2003-12-04 10:01 UTC
From: b dot m dot d dot scott at herts dot ac dot uk Assigned: pajoye
Status: Closed Package: Date
PHP Version: 4.3.3 OS: windows
Roadmaps: (Not assigned)    
Subscription  


 [2003-12-04 10:01 UTC] b dot m dot d dot scott at herts dot ac dot uk
Description: ------------ when BeginOfNextWeek is called no matter what format you pass it will always return a date in the format %Y%m%d. I think that this is because of the way that the date is passed to beginOfWeek: return Date_Calc::beginOfWeek( $next_week_day,$next_week_month,$next_week_year ); It is missing the format part so when it is changed to: return Date_Calc::beginOfWeek( $next_week_day,$next_week_month,$next_week_year,$format ); It works. Reproduce code: --------------- $tdate=Date_Calc::beginOfNextWeek('4','11','2003','%Y-%m-%d'); print $tdate; Expected result: ---------------- 2003-11-08 Actual result: -------------- 20031108

Comments

 [2003-12-04 10:43 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.