Received: from marketingchallenge.com (marketingchallenge.com [64.40.111.205] (may be forged)) by postgresql.org (8.11.3/8.11.4) with SMTP id f8JLl9e86170 for ; Wed, 19 Sep 2001 17:47:09 -0400 (EDT) (envelope-from drfrog@smartt.com) Received: (qmail 21251 invoked from network); 19 Sep 2001 21:47:05 -0000 Received: from clayton-cottingham.imc (HELO smartt.com) (10.1.4.1) by marketingchallenge.com with SMTP; 19 Sep 2001 21:47:05 -0000 Message-ID: <3BA912E3.E1753E7@smartt.com> Date: Wed, 19 Sep 2001 14:49:23 -0700 From: clayton cottingham X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.17-21mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: Brett Schwarz CC: Josh Berkus , pgsql-sql@postgresql.org Subject: Re: Holiday Calculations? References: <3BA8EB71.C82840C8@yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200109/159 X-Sequence-Number: 4837 Brett Schwarz wrote: > > I couldn't resist, so I went ahead and did all of them. I might be using > these in a future app anyways. Again these are Tcl procs, but you may be > able to transfer the logical to another language, if you want. > if you need this in perl i think Data::Manip might hep: Date_IsHoliday $name=&Date_IsHoliday($date); This returns undef if $date is not a holiday, or a string containing the name of the holiday otherwise. An empty string is returned for an unnamed holiday. also there is a section on holidays in the config file where you can set up your own : 1/1 = New Year's Day third Monday in Feb = Presidents' Day fourth Thu in Nov = Thanksgiving hope this is useful!