HolidayCalendar Class

Quartz.NET 3.0 API Documentation
This implementation of the Calendar stores a list of holidays (full days that are excluded from scheduling).
Inheritance Hierarchy

SystemObject
  Quartz.Impl.CalendarBaseCalendar
    Quartz.Impl.CalendarHolidayCalendar

Namespace:  Quartz.Impl.Calendar
Assembly:  Quartz (in Quartz.dll) Version: 3.0.0
Syntax

C#
[SerializableAttribute]
public class HolidayCalendar : BaseCalendar

The HolidayCalendar type exposes the following members.

Constructors

  NameDescription
Public methodHolidayCalendar
Initializes a new instance of the HolidayCalendar class.
Public methodHolidayCalendar(ICalendar)
Initializes a new instance of the HolidayCalendar class.
Protected methodHolidayCalendar(SerializationInfo, StreamingContext)
Serialization constructor.
Top
Properties

  NameDescription
Public propertyCalendarBase
Set a new base calendar or remove the existing one
(Inherited from BaseCalendar.)
Public propertyDescription
Gets or sets the description given to the ICalendar instance by its creator (if any).
(Inherited from BaseCalendar.)
Public propertyExcludedDates
Returns a collection of dates representing the excluded days. Only the month, day and year of the returned dates are significant.
Public propertyTimeZone
Gets or sets the time zone.
(Inherited from BaseCalendar.)
Top
Methods

  NameDescription
Public methodAddExcludedDate
Add the given Date to the list of excluded days. Only the month, day and year of the returned dates are significant.
Public methodClone
Creates a new object that is a copy of the current instance.
(Overrides BaseCalendarClone.)
Protected methodCloneFields (Inherited from BaseCalendar.)
Public methodEquals(Object) (Overrides BaseCalendarEquals(Object).)
Public methodEquals(BaseCalendar) (Inherited from BaseCalendar.)
Public methodEquals(HolidayCalendar)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode (Overrides BaseCalendarGetHashCode.)
Public methodGetNextIncludedTimeUtc
Determine the next time (in milliseconds) that is 'included' by the Calendar after the given time.

Note that this Calendar is only has full-day precision.

(Overrides BaseCalendarGetNextIncludedTimeUtc(DateTimeOffset).)
Public methodGetObjectData (Overrides BaseCalendarGetObjectData(SerializationInfo, StreamingContext).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsTimeIncluded
Determine whether the given time (in milliseconds) is 'included' by the Calendar.

Note that this Calendar is only has full-day precision.

(Overrides BaseCalendarIsTimeIncluded(DateTimeOffset).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRemoveExcludedDate
Removes the excluded date.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

The implementation DOES take the year into consideration, so if you want to exclude July 4th for the next 10 years, you need to add 10 entries to the exclude list.
See Also

Reference