RecurrenceParse Method

This is used to parse recurrence properties from a string in vCalendar 1.0 basic grammar format or iCalendar 2.0 RRULE/EXRULE format.

Definition

Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
public void Parse(
	string recur
)

Parameters

recur  String
The recurrence parameters in vCalendar 1.0 basic grammar format or iCalendar 2.0 RRULE/EXRULE format.

Remarks

The RRULE or EXRULE property name is ignored if present. All properties except the start date/time are cleared and reset to their default values prior to parsing the string. Passing a null or empty string is equivalent to calling Reset. If the string is in the older vCalendar format, only the basic recurrence rule grammar is supported. Full support is provided for the iCalendar format.

Example

C#
Recurrence r = new Recurrence("FREQ=DAILY;COUNT=30;INTERVAL=5");

// The above is equivalent to:
// Recurrence r = new Recurrence();
// r.Parse("FREQ=DAILY;COUNT=30;INTERVAL=5");

// Set the start date
r.StartDateTime = DateTime.Today;

// Get all instances generated by the recurrence
DateTimeCollection dc = r.AllInstances();

See Also