Date_Holidays

From: Date: Sat, 18 Oct 2003 19:28:10 +0000
Subject: Date_Holidays
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22799@lists.php.net to get a copy of this message
Hi, I will have to implement a calendar in PHP that knows when certain holidays (like easter) are. I thought about implementing the algorithm in a class called Date_Holidays, so it can be used in PEAR. But as different countries have different holidays (in the US, labour day is in September, in Germany it's in May) I thought about a factory method like: $holidays = Date_Holidays::getHolidays('Germany'); This will return an object Date_Holidays_German, so at a later point Date_Holdays_France, etc. could be implemented. The object could then supply some methods to check whether a date is a holiday, list all holidays in a certain year or return one holiday for one year... Any thoughts or comments about this? I'll probably start working on this next monday. Stephan --- Stephan Schmidt schst@php-tools.net http://www.php-tools.net

« previous php.pear.dev (#22799) next »