AW: [PEAR-DEV] Re: Date_Holidays

From: Date: Sun, 19 Oct 2003 08:59:26 +0000
Subject: AW: [PEAR-DEV] Re: Date_Holidays
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22811@lists.php.net to get a copy of this message
Hi, I agree with this. Holiday does not mean you get a day off. The same in Germany. We have holidays in Germany where people in some regions get a day of and in others they don't Stephan --- Stephan Schmidt schst@php-tools.net http://www.php-tools.net > -----Ursprüngliche Nachricht----- > Von: Joe Stump [mailto:joe@joestump.net] > Gesendet: Sonntag, 19. Oktober 2003 02:09 > An: Stefan Neufeind > Cc: pear-dev@lists.php.net > Betreff: Re: [PEAR-DEV] Re: Date_Holidays > > > Not sure about i18n, but here in the US just because you > don't get the day > off doesn't mean it's not a holiday. For example: Holoween > here in the US > is a "holiday" but I don't get it off work. > > --Joe > > > Maybe some more general approach / name possible? Why just holidays? > > In Germany there are a few remarkable days for which nowadays you > > won't get a free day (namely holiday) from your boss. > > > > Something like: Date_SpecialDates? Just a thought ... > > > > Stefan > > > > On 18 Oct 2003 at 16:00, Greg Beaver wrote: > > > >> Hi Stephan, > >> > >> This would be very useful. I have some working code that > calculates a > >> few holidays like American Thanksgiving, Memorial Day, and also > >> several other random holidays (Labor Day, etc.). It also > calculates > >> major Jewish holidays like Rosh Hashanah, I'd be happy to > make my old > >> and rather scrappy code available to extract some algorithms. The > >> code is used as a backed for calendar.chiaraquartet.net > >> > >> It would be great to see the code PEARified and unit tested. > >> > >> Regards, > >> Greg > >> > >> Stephan Schmidt wrote: > >> > 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 > >> > >> -- > >> PEAR Development Mailing List (http://pear.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > > > > -- > > PEAR Development Mailing List (http://pear.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > Joe Stump <joe@joestump.net> > http://www.joestump.net > "Label makers are proof God wants Sys Admins to be happy." > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

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