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

Bug #13395 isHoliday resets interal year storage
Submitted: 2008-03-15 02:18 UTC Modified: 2008-03-17 06:16 UTC
From: doconnor Assigned: kguest
Status: Closed Package: Date_Holidays
PHP Version: 5.2.5 OS:
Roadmaps: 0.18.0    
Subscription  


 [2008-03-15 02:18 UTC] doconnor (Daniel O'Connor)
Description: ------------ When you create a new holidays driver, you pass in a year. If you check a date not in that year, the storage internally is result - but _buildHolidays is not called again Test script: --------------- <?php require_once 'Date/Holidays.php'; $driver = &Date_Holidays::factory('USA', 2007); $workday = new Date('2010-04-26'); if ($driver->isHoliday($workday)) { } $hols = $driver->getHolidays(); print_r($hols['christmasDay']); Expected result: ---------------- ---------- PHP ---------- Date_Holidays_Holiday Object ( [_internalName] => christmasDay [_title] => Christmas Day [_date] => Date Object ( [year] => 2007 [month] => 12 [day] => 24 [hour] => 00 [minute] => 00 [second] => 00 [partsecond] => 0 [tz] => Date_TimeZone Object ( [id] => UTC [longname] => Coordinated Universal Time [shortname] => UTC [hasdst] => [dstlongname] => Coordinated Universal Time [dstshortname] => UTC [offset] => 0 [default] => ) [getWeekdayAbbrnameLength] => 3 ) [_properties] => Array ( ) ) Output completed (0 sec consumed) Actual result: -------------- ---------- PHP ---------- Date_Holidays_Holiday Object ( [_internalName] => christmasDay [_title] => Christmas Day [_date] => Date Object ( [year] => 2010 [month] => 12 [day] => 24 [hour] => 00 [minute] => 00 [second] => 00 [partsecond] => 0 [tz] => Date_TimeZone Object ( [id] => UTC [longname] => Coordinated Universal Time [shortname] => UTC [hasdst] => [dstlongname] => Coordinated Universal Time [dstshortname] => UTC [offset] => 0 [default] => ) [getWeekdayAbbrnameLength] => 3 ) [_properties] => Array ( ) ) Output completed (0 sec consumed)

Comments

 [2008-03-17 06:16 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.