Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • *Experts*
Posted

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

"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
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...