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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!