pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: clayton cottingham <drfrog@smartt.com>
To: Brett Schwarz <brett_schwarz@yahoo.com>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Holiday Calculations?
Date: Wed, 19 Sep 2001 14:49:23 -0700
Message-ID: <3BA912E3.E1753E7@smartt.com> (raw)
References: <web-121104@davinci.ethosmedia.com>
	<3BA8EB71.C82840C8@yahoo.com>

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!



view thread (6+ messages)  latest in thread

Message-ID: <3BA912E3.E1753E7@smartt.com>
Permalink:  ../3BA912E3.E1753E7@smartt.com/
Also on:    postgresql.org/message-id/3BA912E3.E1753E7@smartt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: drfrog@smartt.com, brett_schwarz@yahoo.com, josh@agliodbs.com
  Subject: Re: Holiday Calculations?
  In-Reply-To: <3BA912E3.E1753E7@smartt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox