Re: [PEPr] Comment on Date and Time::Date_Holidays
| From: | Philippe Jausions | Date: | Sun, 20 Jun 2004 16:49:17 +0000 |
| Subject: | Re: [PEPr] Comment on Date and Time::Date_Holidays | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30961@lists.php.net to get a copy of this message | ||
Pepr wrote:
Lorenzo Alberton (http://pear.php.net/user/quipo) has commented on the proposal for Date and Time::Date_Holidays. Comment: This is a package that can be really useful, a perfect companion to PEAR::Calendar. Thanks for proposing it! Just a few suggestions: don't store holidays in the class, but provide a method to import them from a datasource (.ini file, database, whatever). The class should provide some baked data files as examples, but the final user must be able to customize his data (maybe he wants to filter some holidays out). Also, the final user probably prefers handling simple text files than writing new classes just to add a few holidays:As someone else said, holiday rules can get pretty complex, so driver-based approach is most likely the best for most standard holidays. Having some kind of easy import facility may be good too but for simple day rules. I would suggest to use the two-letter country code for the driver names. That will help for automated loading of holidays based on the Accept-Language HTTP header. -Philippe