FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=17633&edit=1

ID: 17633
Updated by: ken@linux.ie
Reported By: will at willolbrys dot com
Summary: Speeding up Date_Holidays_Driver->getHolidayForDate
-Status: Assigned
+Status: Closed
Type: Feature/Change Request
Package: Date_Holidays
Package Version: SVN
PHP Version: 5.3.3
Assigned To: kguest
Roadmap Versions:
New Comment:

-Status: Assigned
+Status: Closed
This bug has been fixed in SVN.

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.




Previous Comments:
------------------------------------------------------------------------

[2010-07-28 08:05:57] kguest

-Assigned To:
+Assigned To: kguest


------------------------------------------------------------------------

[2010-07-27 03:21:53] willolbrys

Added #patch
bug:17633;patch:speedup-getHolidayForDate;revision:1280200913;.

------------------------------------------------------------------------

[2010-07-27 03:17:51] willolbrys

Description:
------------
Since the basic Date_Holidays_Driver only contains one specific year, we
can speed up getHolidaysForDate by first checking that the
date/timestamp/etc has the correct year.

I just want to submit a tiny patch that makes this check:

if($date->getYear() != $this->_year){
return null;
}

It will make composite searches much faster since it wont bother
checking drivers that don't have the correct year specified. Since in
cases like the Composite Driver getHolidaysForDate is already
overwritten, this shouldnt affect any weird drivers you might make.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 12, '11 at 11:13p
activeDec 12, '11 at 11:13p
posts1
users1
websitepear.php.net

1 user in discussion

Ken: 1 post

People

Translate

site design / logo © 2022 Grokbase