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

Bug #14381 Wrong dates in Father's day and Mother's day
Submitted: 2008-07-21 17:31 UTC
From: amg1127 Assigned: kguest
Status: Closed Package: Date_Holidays_Brazil (version 0.1.0)
PHP Version: 5.2.0 OS: Debian Etch
Roadmaps: 0.1.1    
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 : 42 + 6 = ?

 
 [2008-07-21 17:31 UTC] amg1127 (Anderson Gomes)
Description: ------------ When using "Date_Holidays_Brazil" package with Horde Framework, I saw Father's day being scheduled to August, 11 (2nd Monday). But actually, father's day is at 2nd Sunday (August, 10). By looking at the source code, I say Mother's day is also wrong. In file "/usr/share/php/Date/Holidays/Driver/Brazil.php", line #167 must be changed from: $fathersDay = $this->_calcNthWeekDayInMonth(2, 1, 8); to: $fathersDay = $this->_calcNthWeekDayInMonth(2, 0, 8); And line #146 must be changed from: $mothersDay = $this->_calcNthWeekDayInMonth(2, 1, 5); to: $mothersDay = $this->_calcNthWeekDayInMonth(2, 0, 5); Test script: --------------- I don't know how to do it. Expected result: ---------------- Father's day scheduled at Sunday, August, 10. Actual result: -------------- Father's day scheduled at Monday, August, 11.

Comments

 [2008-07-22 00:05 UTC] kguest (Ken Guest)
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.