gitlabEdit

arrow-rotate-rightRecurrence Rules

Repeat, repeat, repeat

Recurrence rules are event, to-do, journal, or standard and daylight timezone repetition instances that define how to repeat a specific number of times using a rule that adjusts the number of days, weeks, or a time unit in which the repetition occurs. These rules adjust how to repeat an event.

circle-info

This is only applicable to calendars, but you can use the parser anywhere.


Versions of the recurrence rule parser

The recurrence rule parser has two versions:

You can see how to construct your own recurrence rule using the above links. The recurrence rules can be parsed using one of the following functions found in the RecurrenceParser class:

  • Version 1: ParseRuleV1()

  • Version 2: ParseRuleV2()

circle-info

These functions are named after the method that the appropriate vCalendar versions uses.


Recurrence rule properties

After parsing, these functions return an array of recurrence rules (version 1) or a recurrence rule instance (version 2) using the RecurrenceRule class.

chevron-rightGeneral propertieshashtag

All properties about a recurrence rule that are applied globally are:

Property
Description

Version

Recurrence rule version

Frequency

Recurrence frequency that describes the granularity of the repetition

Internal

Repeat frequency

Duration

Number of occurrences that this rule generates

EndDate

Specifies whether this date is the last time to repeat

chevron-rightvCalendar 1.0 recurrence rule propertieshashtag

The below properties only apply to vCalendar 1.0:

Property
Description

V1TimePeriods

Time periods for daily frequency

V1DayTimes

Days of week for weekly frequency

V1MonthlyOccurrences

Monthly occurrences

V1MonthlyDayNumbers

Monthly by day numbers

V1YearlyMonthNumbers

Yearly by month numbers

V1YearlyDayNumbers

Yearly by day numbers

circle-info

For all properties mentioned above, isEnd indicates the end marker.

chevron-rightvCalendar 2.0 recurrence rule propertieshashtag

The below properties only apply to vCalendar 2.0:

Property
Description

StartWeekday

A day that defines the start of the week

V2Seconds

List of seconds

V2Minutes

List of minutes

V2Hours

List of hours

V2Days

List of days

V2MonthlyDays

List of days of month

V2YearlyDays

List of days of year

V2WeekNumbers

List of week numbers

V2MonthNumbers

List of month numbers

V2Positions

List of positions

Last updated