For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > April 2005 > Holidays









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Holidays
Robert

2005-04-20, 8:56 pm

I need to populate a Pg database with holidays (US, Federal, Christian,
Islamic, and Jewish). I didn't find anything on CPAN (but you have to know
what to search for). The Islamic and Jewish ones are a little problematic
because they can shift for year to year. Do you know of a resource I can
look at?

Robert


Chris Devers

2005-04-20, 8:56 pm

On Wed, 20 Apr 2005, Robert wrote:

> I need to populate a Pg database with holidays (US, Federal,
> Christian, Islamic, and Jewish). I didn't find anything on CPAN (but
> you have to know what to search for). The Islamic and Jewish ones are
> a little problematic because they can shift for year to year. Do you
> know of a resource I can look at?


How far out do you need to go? A few years? If so, there's little point
in calculating the dates -- just download a list of dates and pump that
into your database by whatever means you like.

An excellent source for this kind of data is ICalShare. This section on
their site should be what you're looking for:

<http://icalshare.com/index.php?topic=holidays>

Note that by just downloading the data, this ceases to be a Perl
problem, unless you want to use Perl to parse the ICS / VCal data...



--
Chris Devers
Offer Kaye

2005-04-20, 8:56 pm

On 4/20/05, Robert <catcher@linuxmail.org> wrote:
> I need to populate a Pg database with holidays (US, Federal, Christian,
> Islamic, and Jewish). I didn't find anything on CPAN (but you have to kno=

w
> what to search for). The Islamic and Jewish ones are a little problematic
> because they can shift for year to year. Do you know of a resource I can
> look at?
>=20


I know of:
[url]http://www.inoff.com/hebcal/[/url]
http://search.cpan.org/dist/Date-Holidays/

HTH,
--=20
Offer Kaye
Peter Scott

2005-04-21, 3:56 pm

On Wed, 20 Apr 2005 11:11:00 -0400, Robert wrote:
> I need to populate a Pg database with holidays (US, Federal, Christian,
> Islamic, and Jewish). I didn't find anything on CPAN (but you have to know
> what to search for). The Islamic and Jewish ones are a little problematic
> because they can shift for year to year. Do you know of a resource I can
> look at?


Once you find the rules, I suggest using the framework of Date::Calendar
and Date::Calendar::Profiles to do your date calculations.

--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com