RecurringObjectInstancesBetween Method

This method is used to return all recurring instances between the two specified date/times based on the current settings.

Definition

Namespace: EWSoftware.PDI.Objects
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2023.1.2.0
public DateTimeInstanceCollection InstancesBetween(
	DateTime fromDate,
	DateTime toDate,
	bool inLocalTime
)

Parameters

fromDate  DateTime
The minimum date/time on or after which instances should occur. This will include an instance if it starts before the date/time but overlaps it when its duration is added to its start time.
toDate  DateTime
The maximum date/time on or before which instances should occur. This will include an instance if it starts on or before the specified date/time regardless of its duration.
inLocalTime  Boolean
If true, the date/time parameters are assumed to be in local time and the returned date/times are expressed in local time. If false, the date/time parameters are assumed to be in the time zone of the object and the returned date/times are expressed 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

DateTimeInstanceCollection
Returns a DateTimeInstanceCollection containing DateTimeInstance objects that represent all instances found between the two specified date/times. Instances may have a different duration if created from an RDATE property.

Exceptions

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

See Also