FloatingHoliday Class

This class is used to define a floating holiday, one that falls on a particular day of the week instance (i.e. Thanksgiving is the 4th Thursday in November).

Definition

Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
[SerializableAttribute]
public class FloatingHoliday : Holiday, 
	ISerializable
Inheritance
Object    Holiday    FloatingHoliday
Implements
ISerializable

Remarks

Floating holidays are calculated based on an occurrence of a day of the week in a month (1st through 4th or last). The Offset property can be used to calculate a day that falls some time before or after a holiday (i.e. the day after Thanksgiving).

Normally, this class is not used by itself. Instead, it is used in conjunction with the HolidayCollection class. The class supports serialization.

Constructors

FloatingHoliday Default constructor
FloatingHoliday(SerializationInfo, StreamingContext) Deserialization constructor for use with ISerializable
FloatingHoliday(DayOccurrence, DayOfWeek, Int32, Int32, String) Construct a new holiday object that occurs on a floating date

Properties

Description This sets or gets a description for the holiday
(Inherited from Holiday)
MaximumYear The maximum year for the holiday
(Inherited from Holiday)
MinimumYear The minimum year for the holiday
(Inherited from Holiday)
Month This sets or gets the month used for the holiday
(Inherited from Holiday)
Occurrence This sets or gets the occurrence of the day of the week on which a floating holiday falls
Offset This sets or gets the number of days before or after the calculated floating date on which the holiday actually occurs.
Weekday This sets or gets the week day used for the holiday

Methods

Clone This is overridden to clone a floating holiday object
(Overrides HolidayClone)
Equals This is overridden to allow proper comparison of FloatingHoliday objects
(Overrides ObjectEquals(Object))
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCode Get a hash code for the holiday object
(Overrides ObjectGetHashCode)
GetObjectData This implements the ISerializable interface and adds the appropriate members to the serialization info.
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToDateTime Convert the instance to a DateTime object based on its settings and the passed year value.
(Overrides HolidayToDateTime(Int32))
ToString Convert the holiday instance to its string description
(Inherited from Holiday)

See Also