Hi Anthony,

I assume you want to find X business days from a certain date. I wrote
something like that once. You still need to keep track of holidays in a
table or array though. Here's the pseudo code. I'm sure you can write it in
Witango tags. :)

populate an array of holidays
counter = 0
endDate = startDate
for 1 to some arbitrary high number (an @while tag would be nice here)
   if counter >= # of days then break
   endDate = endDate +  1 day
   if endDate is not Saturday or Sunday and not in holiday array then
increment counter
/for

You can easily put it in a method, pass it the startDate and #of days, and
have it return the endDate.

Is that what you were looking for?

Dave Shelley
[EMAIL PROTECTED]

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Anthony M. Humphreys
Sent: Wednesday, December 11, 2002 7:48 PM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: Holiday Calculator


Does anyone have a Tango/Witango or JavaScript Holiday calculator that they
are willing to share?

I know about this:
        http://gethelp.devx.com/techtips/thesqlpro/10min/10min0201/10min0201.asp
...but this is a bit too clumsy for my purposes.

I was hoping for a program that can calculate holidays, not a brute force
method where I have to add all the dates and holidays into a table before
hand.

Anyone got some ideas?

Anthony -


________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to