Date Question

burak

Centurion
Joined
Jun 17, 2003
Messages
127
Hello,

In the app I am working on, we receive a notification from a federal agency (US) and then we are required to send them a message after 24 hours have passed.

But if the next day falls on a weekend or a federal holiday, we are supposed to send the message the next weekday that does not fall on a holiday.

It's easy to determine if the next day is going to fall on a weekend by calling

DatePart(DateInterval.Weekday, DateAdd(DateInterval.Day, 1, Now)))

and checking to see if the returned value is 1 (sunday)
or 7 (saturday)

How can we determine if a day is a federal holiday or not? Do we have to store these federal holidays in a database?
Some federal holidays don't fall on the same day every year correct?

Thank you,

Burak
 
In the project I work on, also government, we have to store not only the Federal Holidays (manually, a database or file works well - depends on your needs) but ALSO store holidays per County. This is for state work, but some counties have special holidays that they follow every year and they're different per county. And keep in mind that some holidays aren't on a specific day, but on "the 3rd Tuesday of the month" type of holidays.

-Nerseus
 
Back
Top