Re: Re: [PEPr] Comment on Date and Time::Date_Holidays
| From: | Philippe Jausions | Date: | Sun, 20 Jun 2004 18:15:07 +0000 |
| Subject: | Re: Re: [PEPr] Comment on Date and Time::Date_Holidays | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-30971@lists.php.net to get a copy of this message | ||
Stephan Schmidt wrote:
Hi,Agreed... I was just pointing out that "Germany", "France", "USA" whatever... is not a good driver naming convention when there are standardized codes to represent the country...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.What would you use for Christian or Jewish drivers? A lot of holidays are religious, so these classes are pretty important...
Furthermore there are different states in Germany, that have different holidays, two letters will probably not be sufficient in these cases.Sure, 2-letters codes are for countries only, but I bet you have some standard codes for regions on Germany as well... ;-) Using them if needed should simplify things.
Regarding the import, I guess this is no problem, can easily be implemented using a new driver: $d = &Date_Holidays::factory('INI', 2004, 'en_EN'); $d->importHolidaysFromIniFile('myHolidays.ini'); Shouldn't be too hard implementing this.Not that I would use that feature, but could easily be useful for private organizations without having to write a whole dirver... But that's really secondary... -Philippe