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 : 40 - 23 = ?

 
 [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] 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!