Recurring ObjectOccurs On 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: 2025.1.9.0
Returns true if an instance occurs on the specified date/time, false if not
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2025.1.9.0
C#
public bool OccursOn(
DateTime checkDate,
bool includeTime,
bool inLocalTime
)VB
Public Function OccursOn (
checkDate As DateTime,
includeTime As Boolean,
inLocalTime As Boolean
) As BooleanC++
public:
bool OccursOn(
DateTime checkDate,
bool includeTime,
bool inLocalTime
)F#
member OccursOn :
checkDate : DateTime *
includeTime : bool *
inLocalTime : bool -> bool 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
BooleanReturns true if an instance occurs on the specified date/time, false if not
Exceptions
| ArgumentException | This is thrown if a start date has not been specified (it equals DateTime.MinValue) or the duration is negative. |