| From: | clayton cottingham <drfrog(at)smartt(dot)com> | 
|---|---|
| To: | Brett Schwarz <brett_schwarz(at)yahoo(dot)com> | 
| Cc: | Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-sql(at)postgresql(dot)org | 
| Subject: | Re: Holiday Calculations? | 
| Date: | 2001-09-19 21:49:23 | 
| Message-ID: | 3BA912E3.E1753E7@smartt.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-sql | 
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!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kovacs Baldvin | 2001-09-19 22:03:51 | Re: Creating a boolean function | 
| Previous Message | Diehl, Jeffrey | 2001-09-19 21:00:00 | Re: Out of free buffers... HELP! |