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

Bug #18953 wrong calculation of the Advent Holidays
Submitted: 2011-11-03 14:19 UTC
From: nchararas Assigned: kguest
Status: Closed Package: Date_Holidays_Austria (version 0.1.4)
PHP Version: 5.3.1 OS: GNU/Debian Linux
Roadmaps: (Not assigned)    
Subscription  


 [2011-11-03 14:19 UTC] nchararas (Nikos Chararas)
Description: ------------ excerpt from the Austria.php file: /** * 1. Advent */ $firstAdv = $this->_calcFirstMonday(12); $firstAdv = $firstAdv->getPrevDay(); $this->_addHoliday('firstAdvent', $firstAdv, '1. Advent'); /** * 2. Advent */ $secondAdv = $this->_addDays($firstAdv, 7); $this->_addHoliday('secondAdvent', $secondAdv, '2. Advent'); /** * 3. Advent */ $thirdAdv = $this->_addDays($firstAdv, 14); $this->_addHoliday('thirdAdvent', $thirdAdv, '3. Advent'); /** * 4. Advent */ $fourthAdv = $this->_addDays($firstAdv, 21); $this->_addHoliday('fourthAdvent', $fourthAdv, '4. Advent'); however, this year it calculates Dec. 25th as the 4rth advent, which is not possible, the latest date for the 4rth advent is Dec. 24rth ( in which case it is not celebrated, and should not be shown ) the correct way of implementing this would be to determine the 1st Advent as follows, as the first sunday after the 26th of November.

Comments

 [2013-02-02 05:21 UTC] kguest (Ken Guest)
-Assigned To: +Assigned To: kguest
 [2013-02-02 05:38 UTC] kguest (Ken Guest)
-Status: Assigned +Status: Closed
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at http://pear.php.net/get/ I believe this is now fixed in the newly released 0.1.5-alpha release.