VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Find Floating Holidays and nth Weekday of any Month and Year

Jason Butera  (2 Submissions)   Math/Dates   Visual Basic 3.0   Advanced   Wed 3rd February 2021

This code module consists of 2 functions that will answer the following questions:
- Is 05/25/2020 a federal holiday?
- What date is the 3rd Tuesday in January of 2010?
Many holidays are not on a specific date. Memorial Day, for example, is on the last Monday of May. Many other federal holidays follow rules like this (MLK, Thanksgiving, Labor Day, etc...). This code looks for all federal holidays (specific dates and floating dates). You can modify the code to include or remove other holidays.
Our system could not have due dates that fall on a holiday, so I wrote this code and I'm sharing it with you. The included form that uses the code is just an example (no error trapping). If you like and use this module, please vote for me with a kind word. Cheers!

Inputs
GetDateByOccurrence(Year,Month,Weekday,Occurrence) IsHoliday(Date)

Returns
GetDateByOccurrence(): Variant (Date or String) IsHoliday(): Boolean

Side Effects
None Known

Rate Find Floating Holidays and nth Weekday of any Month and Year (7(7 Vote))

Download Find Floating Holidays and nth Weekday of any Month and Year

Find Floating Holidays and nth Weekday of any Month and Year Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters