FixedHoliday Class

This class is used to define a fixed holiday, one that falls on a specific month and day (i.e. July 4th).

Definition

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

Remarks

Fixed holidays can be automatically adjusted backwards to Friday if they fall on a Saturday or forward to Monday if they fall on a Sunday.

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

Constructors

FixedHoliday Default constructor
FixedHoliday(SerializationInfo, StreamingContext) Deserialization constructor for use with ISerializable
FixedHoliday(Int32, Int32, Boolean, String) Construct a new holiday object that occurs on a fixed date. The holiday date can optionally be adjusted to a Friday or Monday if it falls on a weekend.

Properties

AdjustFixedDate This property is used to determine whether or not fixed holiday dates are adjusted so as not to fall on a weekend.
Day This sets or gets the day used for the holiday
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
(Overrides HolidayMonth)

Methods

Clone This is overridden to clone a fixed holiday object
(Overrides HolidayClone)
Equals This is overridden to allow proper comparison of FixedHoliday 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