472,373 Members | 2,009 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,373 software developers and data experts.

Determine if a Date is a Bank Holiday

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
6 14080

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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Robert Scarborough | last post by:
I have a Table in a Typed Dataset which contains a Date field called EventDate. I've ensured that the field is defined as Date as opposed to DateTime in the Typed Dataset. When I generate an...
6
by: Yeah | last post by:
I have alternate holiday headers for my web site, and I would like to display a certain image for an upcoming holiday. Examples: Christmas 12/10 - 12/26 New Years Eve 12/27 - 1/2...
5
by: Coleen | last post by:
Hi all :-) I have a bit of code that chacks for the last day of the Month, and if it falls on a week-end, sets the due date to the Monday after... I'm trying to get the date to go to the...
1
by: Coleen | last post by:
Hi all :-) My post on weird date formatting disappeared from my list, so if this a duplicate post, I apologize. I'm having trouble getting a date to format as just "MM/dd" I don't care what...
1
by: Wayne | last post by:
Hi all I'm trying to calculate the number of days (or workdays) between 2 given dates that do not include weekend days or public holidays (public holidays are user defined from a dbase, have a...
3
by: ramdil | last post by:
Hi All I have a small requirement.I have column called payment date in my system.Now i want a validation as follows. when someone enters a payment date for over a weekend or bank holiday then it...
11
by: Connie via AccessMonster.com | last post by:
Hi Access Building Friends, I am building a database for a manufacturer who needs to know the projected End_Date of each job. I know the Start_Date and the total days required to do the job. ...
4
by: OzNet | last post by:
I have some functions to calculate the working days in a given period. This includes a table that is queried to calculate the number of public holidays that don’t occur on a weekend. If I test...
0
by: uno7031 | last post by:
Help Please!!! Adding 5 Days to another Date in an access query Good Morning, Help please…. I am new to access and trying to write a query that will add 5 days between a RecDate and a...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS starter kit that's not only easy to use but also...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.
0
DizelArs
by: DizelArs | last post by:
Hi all) Faced with a problem, element.click() event doesn't work in Safari browser. Tried various tricks like emulating touch event through a function: let clickEvent = new Event('click', {...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.