By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,928 Members | 1,200 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,928 IT Pros & Developers. It's quick & easy.

Determine if a Date is a Bank Holiday

P: n/a
Greetings Access Gurus! I am working on an app to send batch
transactions to our bank, and the bank requires that we place an
effective date on our files that is 'one business day in the future,
excluding holidays and weekends.' I didn't want to build a table of
holidays that would have to be continuously updated, so I searched high
and low for a function that would tell me whether a given date was a
holiday, to no avail. I did find an article that showed how to build a
table of holidays for a given year and add them to a table at
http://www.tek-tips.com/faqs.cfm?fid=6003, so I adapted the code to my
own needs and thought I would share. My calling statement is at the
bottom of my code. After considerable testing, it seems to be working
properly, but would love to know if anyone sees any potential pitfalls
in my solution.

I discovered there are 10 Federal Holidays that banks are closed on,
and that if the holiday falls on a weekend date, they close on the
following Monday. Here's my full code. Please let me know if you see
anything that could bite me in the arse later!

Option Compare Database
Option Explicit
Public Function isHoliday(dtEffDate As Date) As Boolean
'================================================= ================
'This function programmatically determines whether or not a given
'date is a Federal Holiday
'Written by Jana Bauer, adapted from code obtained at
'http://www.tek-tips.com/faqs.cfm?fid=6003
'================================================= ================
On Error GoTo ErrHandler
Dim dtHoliday As Date
Dim intWeekday As Integer
Dim intMondayCount As Integer
Dim intThursdayCount As Integer
Dim lngDay As Long
isHoliday = False
Select Case Month(dtEffDate)
Case 3, 4, 6, 8 'No holidays in these months
Exit Function
Case 1 'Check for January Holidays
'Determine New Year's Day
'1/1 or Following Monday
dtHoliday = CDate("1/1/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then
isHoliday = True
Exit Function
End If
'Determine MLK Day
'3rd Monday in January
dtHoliday = CDate("1/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 30
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay + 14
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 2 'Check for February Holiday
'Determine President's Day
'3rd Monday in February
dtHoliday = CDate("2/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 27
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay + 14
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 5 'Check for May Holiday
'Determine Memorial Day
'Last Monday in May
dtHoliday = CDate("5/31/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 30
intWeekday = WeekDay(dtHoliday - lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday - lngDay
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 7 'Check for July Holiday
'Determine Independence Day
'7/4 or Following Monday
dtHoliday = CDate("7/4/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then isHoliday = True
Case 9 'Check for September Holiday
'Determine Labor Day
'1st Monday in September
dtHoliday = CDate("9/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 29
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 10 'Check for October Holiday
'Determine Columbus Day
'2nd Monday in October
dtHoliday = CDate("10/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 30
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay + 7
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 11 'Check for November Holidays
'Determine Veteran's Day
'11/11 or Following Monday
dtHoliday = CDate("11/11/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then
isHoliday = True
Exit Function
End If
'Determine Thanksgiving Day
'4th Thursday in November
dtHoliday = CDate("11/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 29
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbThursday Then
dtHoliday = dtHoliday + lngDay + 21
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 12 'Check for December Holiday
'Determine Christmas Day
'12/25 or Following Monday
dtHoliday = CDate("12/25/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then isHoliday = True
End Select
Exit_Proc:
Exit Function
ErrHandler:
Select Case Err.Number
Case Else
MsgBox Err.Description, vbCritical, "Error Number " &
Err.Number
End Select
Resume Exit_Proc
Resume
End Function
------------------------------------------------------------------------------------------------------------
Public Function GetFollowingMonday(dtDate As Date) As Date
'Note Sunday = 0, Saturday = 7
On Error GoTo ErrHandler
Dim intWeekday As Integer
intWeekday = WeekDay(dtDate)
Select Case intWeekday
Case vbMonday To vbFriday
GetFollowingMonday = dtDate
Case vbSaturday
GetFollowingMonday = dtDate + 2
Case vbSunday
GetFollowingMonday = dtDate + 1
End Select
Exit_Proc:
Exit Function
ErrHandler:
Select Case Err.Number
Case Else
MsgBox Err.Description, vbCritical, "Error Number " &
Err.Number
End Select
Resume Exit_Proc
Resume
End Function
--------------------------------------------------------------------------------------------------------------
Here's how I call it in my main code:

dtEffDate = GetFollowingMonday(Date + 1)
If isHoliday(dtEffDate) Then
dtEffDate = GetFollowingMonday(dtEffDate + 1)
End If

Thanks in advance for your comments,
Jana

Jan 5 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a

Just one comment from someone with 20 years of experience writing
applications for the financial industry:

Not all banks follow the federal holiday schedule. Some *are* open on
some Federal Holidays, and some follow a different schedule
altogether.

A programmed routine to calculate when a holiday is can be an
interesting programming exercise (I posted one here a few years back),
but it cannot be relied upon for all banks, and not necessarily even
*your* bank. The only reliable way to do this is to ask your bank
what days they will be closed for.

In addition, any program you write will need to be flexible enough to
allow for unplanned closure days. There are a number of reasons
(Weather for one example, major events, etc.) when a bank will close
early, not open, or not allow transactions to occur on.

Oh, and I just noticed, you said below "if the holiday falls on a
weekend date, they close on the following Monday". That is not always
true either. Sometimes they will be closed on a Friday, and sometimes
they won't close on either Monday or Friday. (The employees will be
given "floaters" to use at their will.)

The Federal Holiday schedule is usually available sometime after
December 1 most years. Your bank will certainly have it after the
second week in December. Usually at that time, your bank will have
decided what holidays they will be open on, and which they will be
closed for.

On 5 Jan 2007 08:05:47 -0800, "Jana" <Ba********@gmail.comwrote:
>Greetings Access Gurus! I am working on an app to send batch
transactions to our bank, and the bank requires that we place an
effective date on our files that is 'one business day in the future,
excluding holidays and weekends.' I didn't want to build a table of
holidays that would have to be continuously updated, so I searched high
and low for a function that would tell me whether a given date was a
holiday, to no avail. I did find an article that showed how to build a
table of holidays for a given year and add them to a table at
http://www.tek-tips.com/faqs.cfm?fid=6003, so I adapted the code to my
own needs and thought I would share. My calling statement is at the
bottom of my code. After considerable testing, it seems to be working
properly, but would love to know if anyone sees any potential pitfalls
in my solution.

I discovered there are 10 Federal Holidays that banks are closed on,
and that if the holiday falls on a weekend date, they close on the
following Monday. Here's my full code. Please let me know if you see
anything that could bite me in the arse later!

Option Compare Database
Option Explicit
Public Function isHoliday(dtEffDate As Date) As Boolean
'================================================ =================
'This function programmatically determines whether or not a given
'date is a Federal Holiday
'Written by Jana Bauer, adapted from code obtained at
'http://www.tek-tips.com/faqs.cfm?fid=6003
'================================================ =================
On Error GoTo ErrHandler
Dim dtHoliday As Date
Dim intWeekday As Integer
Dim intMondayCount As Integer
Dim intThursdayCount As Integer
Dim lngDay As Long
isHoliday = False
Select Case Month(dtEffDate)
Case 3, 4, 6, 8 'No holidays in these months
Exit Function
Case 1 'Check for January Holidays
'Determine New Year's Day
'1/1 or Following Monday
dtHoliday = CDate("1/1/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then
isHoliday = True
Exit Function
End If
'Determine MLK Day
'3rd Monday in January
dtHoliday = CDate("1/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 30
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay + 14
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 2 'Check for February Holiday
'Determine President's Day
'3rd Monday in February
dtHoliday = CDate("2/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 27
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay + 14
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 5 'Check for May Holiday
'Determine Memorial Day
'Last Monday in May
dtHoliday = CDate("5/31/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 30
intWeekday = WeekDay(dtHoliday - lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday - lngDay
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 7 'Check for July Holiday
'Determine Independence Day
'7/4 or Following Monday
dtHoliday = CDate("7/4/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then isHoliday = True
Case 9 'Check for September Holiday
'Determine Labor Day
'1st Monday in September
dtHoliday = CDate("9/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 29
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 10 'Check for October Holiday
'Determine Columbus Day
'2nd Monday in October
dtHoliday = CDate("10/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 30
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay + 7
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 11 'Check for November Holidays
'Determine Veteran's Day
'11/11 or Following Monday
dtHoliday = CDate("11/11/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then
isHoliday = True
Exit Function
End If
'Determine Thanksgiving Day
'4th Thursday in November
dtHoliday = CDate("11/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 29
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbThursday Then
dtHoliday = dtHoliday + lngDay + 21
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 12 'Check for December Holiday
'Determine Christmas Day
'12/25 or Following Monday
dtHoliday = CDate("12/25/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then isHoliday = True
End Select
Exit_Proc:
Exit Function
ErrHandler:
Select Case Err.Number
Case Else
MsgBox Err.Description, vbCritical, "Error Number " &
Err.Number
End Select
Resume Exit_Proc
Resume
End Function
------------------------------------------------------------------------------------------------------------
Public Function GetFollowingMonday(dtDate As Date) As Date
'Note Sunday = 0, Saturday = 7
On Error GoTo ErrHandler
Dim intWeekday As Integer
intWeekday = WeekDay(dtDate)
Select Case intWeekday
Case vbMonday To vbFriday
GetFollowingMonday = dtDate
Case vbSaturday
GetFollowingMonday = dtDate + 2
Case vbSunday
GetFollowingMonday = dtDate + 1
End Select
Exit_Proc:
Exit Function
ErrHandler:
Select Case Err.Number
Case Else
MsgBox Err.Description, vbCritical, "Error Number " &
Err.Number
End Select
Resume Exit_Proc
Resume
End Function
--------------------------------------------------------------------------------------------------------------
Here's how I call it in my main code:

dtEffDate = GetFollowingMonday(Date + 1)
If isHoliday(dtEffDate) Then
dtEffDate = GetFollowingMonday(dtEffDate + 1)
End If

Thanks in advance for your comments,
Jana

--
Drive C: Error. (A)bort (R)etry (S)mack The Darned Thing

Jan 6 '07 #2

P: n/a
Chuck:

I appreciate all the feedback! I had considered the issue of
'unplanned' holidays, such as Gerald Ford's funeral, etc. and have been
thinking I will add a table to allow the manual entry of such dates,
without the tedium of entering every holiday each year into it. A
quick search of the table for any additional holidays could return a
True value for the isHoliday function. I did speak with our bank, who
confirmed which holidays they close for and that they only take the
following Monday in the event a holiday is on a Sat or Sun. I know
that my particular app is a bit specific for most people, but I thought
it could at least give some direction for someone else with a similar
situation.

Again, thanks very much for your comments. I must say I was a bit
cross-eyed after looking at it for so long :)

Sincerely,
Jana

Chuck Grimsby wrote:
Just one comment from someone with 20 years of experience writing
applications for the financial industry:

Not all banks follow the federal holiday schedule. Some *are* open on
some Federal Holidays, and some follow a different schedule
altogether.

A programmed routine to calculate when a holiday is can be an
interesting programming exercise (I posted one here a few years back),
but it cannot be relied upon for all banks, and not necessarily even
*your* bank. The only reliable way to do this is to ask your bank
what days they will be closed for.

In addition, any program you write will need to be flexible enough to
allow for unplanned closure days. There are a number of reasons
(Weather for one example, major events, etc.) when a bank will close
early, not open, or not allow transactions to occur on.

Oh, and I just noticed, you said below "if the holiday falls on a
weekend date, they close on the following Monday". That is not always
true either. Sometimes they will be closed on a Friday, and sometimes
they won't close on either Monday or Friday. (The employees will be
given "floaters" to use at their will.)

The Federal Holiday schedule is usually available sometime after
December 1 most years. Your bank will certainly have it after the
second week in December. Usually at that time, your bank will have
decided what holidays they will be open on, and which they will be
closed for.

On 5 Jan 2007 08:05:47 -0800, "Jana" <Ba********@gmail.comwrote:
Greetings Access Gurus! I am working on an app to send batch
transactions to our bank, and the bank requires that we place an
effective date on our files that is 'one business day in the future,
excluding holidays and weekends.' I didn't want to build a table of
holidays that would have to be continuously updated, so I searched high
and low for a function that would tell me whether a given date was a
holiday, to no avail. I did find an article that showed how to build a
table of holidays for a given year and add them to a table at
http://www.tek-tips.com/faqs.cfm?fid=6003, so I adapted the code to my
own needs and thought I would share. My calling statement is at the
bottom of my code. After considerable testing, it seems to be working
properly, but would love to know if anyone sees any potential pitfalls
in my solution.

I discovered there are 10 Federal Holidays that banks are closed on,
and that if the holiday falls on a weekend date, they close on the
following Monday. Here's my full code. Please let me know if you see
anything that could bite me in the arse later!

Option Compare Database
Option Explicit
Public Function isHoliday(dtEffDate As Date) As Boolean
'================================================= ================
'This function programmatically determines whether or not a given
'date is a Federal Holiday
'Written by Jana Bauer, adapted from code obtained at
'http://www.tek-tips.com/faqs.cfm?fid=6003
'================================================= ================
On Error GoTo ErrHandler
Dim dtHoliday As Date
Dim intWeekday As Integer
Dim intMondayCount As Integer
Dim intThursdayCount As Integer
Dim lngDay As Long
isHoliday = False
Select Case Month(dtEffDate)
Case 3, 4, 6, 8 'No holidays in these months
Exit Function
Case 1 'Check for January Holidays
'Determine New Year's Day
'1/1 or Following Monday
dtHoliday = CDate("1/1/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then
isHoliday = True
Exit Function
End If
'Determine MLK Day
'3rd Monday in January
dtHoliday = CDate("1/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 30
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay + 14
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 2 'Check for February Holiday
'Determine President's Day
'3rd Monday in February
dtHoliday = CDate("2/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 27
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay + 14
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 5 'Check for May Holiday
'Determine Memorial Day
'Last Monday in May
dtHoliday = CDate("5/31/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 30
intWeekday = WeekDay(dtHoliday - lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday - lngDay
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 7 'Check for July Holiday
'Determine Independence Day
'7/4 or Following Monday
dtHoliday = CDate("7/4/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then isHoliday = True
Case 9 'Check for September Holiday
'Determine Labor Day
'1st Monday in September
dtHoliday = CDate("9/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 29
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 10 'Check for October Holiday
'Determine Columbus Day
'2nd Monday in October
dtHoliday = CDate("10/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 30
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbMonday Then
dtHoliday = dtHoliday + lngDay + 7
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 11 'Check for November Holidays
'Determine Veteran's Day
'11/11 or Following Monday
dtHoliday = CDate("11/11/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then
isHoliday = True
Exit Function
End If
'Determine Thanksgiving Day
'4th Thursday in November
dtHoliday = CDate("11/1/" & CStr(Year(dtEffDate)))
For lngDay = 0 To 29
intWeekday = WeekDay(dtHoliday + lngDay)
If intWeekday = vbThursday Then
dtHoliday = dtHoliday + lngDay + 21
Exit For
End If
Next lngDay
If dtEffDate = dtHoliday Then isHoliday = True
Case 12 'Check for December Holiday
'Determine Christmas Day
'12/25 or Following Monday
dtHoliday = CDate("12/25/" & CStr(Year(dtEffDate)))
dtHoliday = GetFollowingMonday(dtHoliday)
If dtEffDate = dtHoliday Then isHoliday = True
End Select
Exit_Proc:
Exit Function
ErrHandler:
Select Case Err.Number
Case Else
MsgBox Err.Description, vbCritical, "Error Number " &
Err.Number
End Select
Resume Exit_Proc
Resume
End Function
------------------------------------------------------------------------------------------------------------
Public Function GetFollowingMonday(dtDate As Date) As Date
'Note Sunday = 0, Saturday = 7
On Error GoTo ErrHandler
Dim intWeekday As Integer
intWeekday = WeekDay(dtDate)
Select Case intWeekday
Case vbMonday To vbFriday
GetFollowingMonday = dtDate
Case vbSaturday
GetFollowingMonday = dtDate + 2
Case vbSunday
GetFollowingMonday = dtDate + 1
End Select
Exit_Proc:
Exit Function
ErrHandler:
Select Case Err.Number
Case Else
MsgBox Err.Description, vbCritical, "Error Number " &
Err.Number
End Select
Resume Exit_Proc
Resume
End Function
--------------------------------------------------------------------------------------------------------------
Here's how I call it in my main code:

dtEffDate = GetFollowingMonday(Date + 1)
If isHoliday(dtEffDate) Then
dtEffDate = GetFollowingMonday(dtEffDate + 1)
End If

Thanks in advance for your comments,
Jana


--
Drive C: Error. (A)bort (R)etry (S)mack The Darned Thing
Jan 8 '07 #3

P: n/a
When you speak of "bite me in the arse later", you want to be conscious
of anything which is not table-driven. There's alot of hard-coded
stuff in there, including all your Holidays. In order to avoid future
issues (like Pluto no longer being classified as a planet...), you
should try to load the weekends and Holidays into a table and have the
code reference the table. This may sound like a pain at first, but
there are sites on the 'Net where you can download 10 years of future
Holiday dates now and not have to worry about it again.

Jana wrote:
Chuck:

I appreciate all the feedback! I had considered the issue of
'unplanned' holidays, such as Gerald Ford's funeral, etc. and have been
thinking I will add a table to allow the manual entry of such dates,
without the tedium of entering every holiday each year into it. A
quick search of the table for any additional holidays could return a
True value for the isHoliday function. I did speak with our bank, who
confirmed which holidays they close for and that they only take the
following Monday in the event a holiday is on a Sat or Sun. I know
that my particular app is a bit specific for most people, but I thought
it could at least give some direction for someone else with a similar
situation.

Again, thanks very much for your comments. I must say I was a bit
cross-eyed after looking at it for so long :)

Sincerely,
Jana
Jan 8 '07 #4

P: n/a
Jana wrote:
Chuck:

I appreciate all the feedback! I had considered the issue of
'unplanned' holidays, such as Gerald Ford's funeral, etc. and have been
thinking I will add a table to allow the manual entry of such dates,
without the tedium of entering every holiday each year into it.
That is my take on it as well. Use a holiday table for special
holidays that don't follow a pattern. Some people like using code to
put all the holidays into the holiday table, but I feel that your
choice is the best compromise if you have confidence in your functions.

James A. Fortune
CD********@FortuneJames.com

The ancient Egyptians divided the usually clear night sky into 36
"decans," each identified by a representative perishable star (one that
crosses the horizon) in order to be able to tell the time at night by
observing when that star crosses the horizon. -- from a planetarium
presentation

Jan 8 '07 #5

P: n/a
Thanks again to the both of you for your input. I have already
implemented a 'special' holidays table into my code, and I do have
confidence in the code as it stands for the generic holidays. Here's
hoping that Pluto remains a planet!

Jana
CD********@FortuneJames.com wrote:
Jana wrote:
Chuck:

I appreciate all the feedback! I had considered the issue of
'unplanned' holidays, such as Gerald Ford's funeral, etc. and have been
thinking I will add a table to allow the manual entry of such dates,
without the tedium of entering every holiday each year into it.

That is my take on it as well. Use a holiday table for special
holidays that don't follow a pattern. Some people like using code to
put all the holidays into the holiday table, but I feel that your
choice is the best compromise if you have confidence in your functions.

James A. Fortune
CD********@FortuneJames.com

The ancient Egyptians divided the usually clear night sky into 36
"decans," each identified by a representative perishable star (one that
crosses the horizon) in order to be able to tell the time at night by
observing when that star crosses the horizon. -- from a planetarium
presentation
Jan 8 '07 #6

P: n/a
Thanks to the both of you for your input. I have already implemented a
'special holidays' table into my code. I have confidence in my code as
it stands for calculating the generic holidays, so lets's hope that
nothing TOO dramatic happens to bank holidays :)

Jana
CD********@FortuneJames.com wrote:
Jana wrote:
Chuck:

I appreciate all the feedback! I had considered the issue of
'unplanned' holidays, such as Gerald Ford's funeral, etc. and have been
thinking I will add a table to allow the manual entry of such dates,
without the tedium of entering every holiday each year into it.

That is my take on it as well. Use a holiday table for special
holidays that don't follow a pattern. Some people like using code to
put all the holidays into the holiday table, but I feel that your
choice is the best compromise if you have confidence in your functions.

James A. Fortune
CD********@FortuneJames.com

The ancient Egyptians divided the usually clear night sky into 36
"decans," each identified by a representative perishable star (one that
crosses the horizon) in order to be able to tell the time at night by
observing when that star crosses the horizon. -- from a planetarium
presentation
Jan 8 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.