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

Bug #3445 bug in Calendar_Week::thisWeek()
Submitted: 2005-02-12 18:10 UTC
From: wolfpak at cyberverse dot com Assigned: quipo
Status: Closed Package: Calendar
PHP Version: 4.3.10 OS: Irrelevant
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 : 25 - 10 = ?

 
 [2005-02-12 18:10 UTC] wolfpak at cyberverse dot com
Description: ------------ Package Version: 0.5.2 I'm calling the thisWeek() method on a Calendar_Week object where the first arg is 'n_in_month' and the date supplied to the Calendar_Week constructor is in the first week of any month. I expected the return value to be 1 to indicate the first week in the month. What I actually get is the LAST week # in the month. Reproduce code: --------------- <?php require_once('Calendar/Week.php'); $week = &new Calendar_Week(2005, 2, 3, 0); $n_in_month = $week->thisWeek('n_in_month'); print "Week # in month: $n_in_month\n"; ?> The patch I created can be downloaded here: http://wolfpak.home.die.net/Calendar_Week-0.5.2-thisWeek.patch Expected result: ---------------- Week # in month: 1 Actual result: -------------- Week # in month: 6

Comments

 [2005-10-20 19:02 UTC] quipo
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.