burak Posted August 21, 2003 Posted August 21, 2003 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 Quote
*Experts* mutant Posted August 21, 2003 *Experts* Posted August 21, 2003 You would have to store the dates the holidays fall on yourself. Quote
*Experts* Nerseus Posted August 21, 2003 *Experts* Posted August 21, 2003 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 Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
burak Posted August 21, 2003 Author Posted August 21, 2003 Hello, Here is a stored procedure that returns the next buysiness day. http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=720&lngWId=5 Here are two sites that list federal holidays upto the year 2010 http://aa.usno.navy.mil/faq/docs/holidays.html http://www.opm.gov/fedhol/ I am thinking of either putting these dates into the database or calling the stored procedure. Burak Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.