HolidayCollectionAddStandardHolidays Method

This adds a standard set of United States holidays to the collection

Definition

Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
public virtual HolidayCollection AddStandardHolidays(
	params Holiday[] additionalDates
)

Parameters

additionalDates  Holiday
An optional set of additional holiday instances to add to the standard set.

Return Value

HolidayCollection
A reference to the holiday collection

Remarks

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:

HolidayDescription
New Year's DayJanuary 1st
Martin Luther King Day3rd Monday in January
President's DayThird Monday in February
Memorial DayLast Monday in May
Independence DayJuly 4th
Labor Day1st Monday in September
Veteran's DayNovember 11th
Thanksgiving4th Thursday in November
Day After Thanksgiving1 day after 4th Thursday in November
Christmas DayDecember 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.

See Also