RecurringObjectOccursOn Method

This method is used to determine whether or not an instance of the recurrence falls on the specified date/time.

Definition

Namespace: EWSoftware.PDI.Objects
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2023.1.2.0
public bool OccursOn(
	DateTime checkDate,
	bool includeTime,
	bool inLocalTime
)

Parameters

checkDate  DateTime
The date/time to check for an occurrence
includeTime  Boolean
If true, time is included in the search. If false, time is ignored and it returns true if an instance occurs at any time on the given date.
inLocalTime  Boolean
If true, the date/time parameter is assumed to be in local time and the recurrence date/times are checked in local time. If false, the date/time parameter is assumed to be in the time zone of the object and the recurrence date/times are checked in the time zone of the object as specified by the TimeZoneId property. If no time zone ID has been specified or it cannot be found, local time is used.

Return Value

Boolean
Returns true if an instance occurs on the specified date/time, false if not

Exceptions

ArgumentExceptionThis is thrown if a start date has not been specified (it equals DateTime.MinValue) or the duration is negative.

See Also