public virtual HolidayCollection AddStandardHolidays(
params Holiday[] additionalDates
)
Public Overridable Function AddStandardHolidays (
ParamArray additionalDates As Holiday()
) As HolidayCollection
public:
virtual HolidayCollection^ AddStandardHolidays(
... array<Holiday^>^ additionalDates
)
abstract AddStandardHolidays :
additionalDates : Holiday[] -> HolidayCollection
override AddStandardHolidays :
additionalDates : Holiday[] -> HolidayCollection
This adds a standard set of United States holidays to the collection that the author gets to take. If you do not get the same set, you can modify the collection after the call or derive a class and override this method to provide the set that you need.
As an alternative, you could serialize a set of holidays to an XML file and load them from it instead.
Fixed dates are set to be adjusted to not fall on a weekend. The holidays added are as follows:
Holiday | Description |
---|---|
New Year's Day | January 1st |
Martin Luther King Day | 3rd Monday in January |
President's Day | Third Monday in February |
Memorial Day | Last Monday in May |
Independence Day | July 4th |
Labor Day | 1st Monday in September |
Veteran's Day | November 11th |
Thanksgiving | 4th Thursday in November |
Day After Thanksgiving | 1 day after 4th Thursday in November |
Christmas Day | December 25th |
Juneteenth is not included as its adoption as a recognized federal holiday varies from state to state. It can be added as an additional holiday with an appropriate minimum year.