Re: Temporal Questions

From: Adam Lowry <adam(at)therobots(dot)org>
To: pdxpug(at)postgresql(dot)org
Subject: Re: Temporal Questions
Date: 2007-05-02 02:53:34
Message-ID: 94C88143-CBFA-442A-9260-DBCD136351F7@therobots.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pdxpug

On Apr 30, 2007, at 11:26 AM, Aaron Burt wrote:
> PGSQL certainly has functions that can tell you what day of the
> week or
> year it is. As for holidays, which ones apply? I think it'd be
> wonderful if someone maintained tables of gov't holidays for the US,
> Canada, the EU, Japan, all 50 States and all 13 Territories and
> Provinces, not to mention banks, major business and trading entities.

> My own take? Let the customer figure out their own dang holidays;
> just
> make it easy to enter them in. Heck, a bit of Perl tomfoolery
> could let
> one import iCal files. If they screw up, it's Not Your Fault.

Apple maintains a pretty good list of holidays in iCal format
(online, that is, not local for the iCal application); that'd be a
good place to start. Placing that into a table could result in some
useful checks to handle these cases.

I'd be very wary of using a table for weekend/weekday/ (and
especially)holiday. I would probably put that into an application
that would run at the end of the day, or week, or whatever. Python or
perl's libraries are likely to handle it better than a pgsql.

Adam

In response to

Browse pdxpug by date

  From Date Subject
Next Message Rich Shepard 2007-05-03 15:37:39 Re: Temporal Questions
Previous Message Aaron Burt 2007-04-30 18:26:00 Re: Temporal Questions