Skip to content

RecurrenceRule

Recurrence rule used with reminders and calendar events.

A recurrence rule specifies how often a reminder or a calendar event should repeat.

+daily

Constructs a daily recurrence rule.

static daily(interval: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every day and a value of 3 specifies that the rule should repeat every third day.

Parameters

interval
number
Interval at which to repeat the rule.

Return value

RecurrenceRule
Constructed recurrence rule.


+dailyEndDate

Constructs a daily recurrence rule with an end date.

static dailyEndDate(interval: number, endDate: Date): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every day and a value of 3 specifies that the rule should repeat every third day.

Parameters

interval
number
Interval at which to repeat the rule.

endDate
Date
Date at which the recurrence rule should end.

Return value

RecurrenceRule
Constructed recurrence rule.


+dailyOccurrenceCount

Constructs a daily recurrence rule with an occurrence count.

static dailyOccurrenceCount(interval: number, occurrenceCount: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every day and a value of 3 specifies that the rule should repeat every third day.

Parameters

interval
number
Interval at which to repeat the rule.

occurrenceCount
number
Number of times the rule should repeat before it ends.

Return value

RecurrenceRule
Constructed recurrence rule.


+weekly

Constructs a weekly recurrence rule.

static weekly(interval: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every week and a value of 3 specifies that the rule should repeat every third week.

Parameters

interval
number
Interval at which to repeat the rule.

Return value

RecurrenceRule
Constructed recurrence rule.


+weeklyEndDate

Constructs a weekly recurrence rule with an end date.

static weeklyEndDate(interval: number, endDate: Date): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every week and a value of 3 specifies that the rule should repeat every third week.

Parameters

interval
number
Interval at which to repeat the rule.

endDate
Date
Date at which the recurrence rule should end.

Return value

RecurrenceRule
Constructed recurrence rule.


+weeklyOccurrenceCount

Constructs a weekly recurrence rule with an occurrence count.

static weeklyOccurrenceCount(interval: number, occurrenceCount: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every week and a value of 3 specifies that the rule should repeat every third week.

Parameters

interval
number
Interval at which to repeat the rule.

occurrenceCount
number
Number of times the rule should repeat before it ends.

Return value

RecurrenceRule
Constructed recurrence rule.


+monthly

Constructs a monthly recurrence rule.

static monthly(interval: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every month and a value of 3 specifies that the rule should repeat every third month.

Parameters

interval
number
Interval at which to repeat the rule.

Return value

RecurrenceRule
Constructed recurrence rule.


+monthlyEndDate

Constructs a monthly recurrence rule with an end date.

static monthlyEndDate(interval: number, endDate: Date): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every month and a value of 3 specifies that the rule should repeat every third month.

Parameters

interval
number
Interval at which to repeat the rule.

endDate
Date
Date at which the recurrence rule should end.

Return value

RecurrenceRule
Constructed recurrence rule.


+monthlyOccurrenceCount

Constructs a monthly recurrence rule with an occurrence count.

static monthlyOccurrenceCount(interval: number, occurrenceCount: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every month and a value of 3 specifies that the rule should repeat every third month.

Parameters

interval
number
Interval at which to repeat the rule.

occurrenceCount
number
Number of times the rule should repeat before it ends.

Return value

RecurrenceRule
Constructed recurrence rule.


+yearly

Constructs a yearly recurrence rule.

static yearly(interval: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every year and a value of 3 specifies that the rule should repeat every third year.

Parameters

interval
number
Interval at which to repeat the rule.

Return value

RecurrenceRule
Constructed recurrence rule.


+yearlyEndDate

Constructs a yearly recurrence rule with an end date.

static yearlyEndDate(interval: number, endDate: Date): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every year and a value of 3 specifies that the rule should repeat every third year.

Parameters

interval
number
Interval at which to repeat the rule.

endDate
Date
Date at which the recurrence rule should end.

Return value

RecurrenceRule
Constructed recurrence rule.


+yearlyOccurrenceCount

Constructs a yearly recurrence rule with an occurrence count.

static yearlyOccurrenceCount(interval: number, occurrenceCount: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every year and a value of 3 specifies that the rule should repeat every third year.

Parameters

interval
number
Interval at which to repeat the rule.

occurrenceCount
number
Number of times the rule should repeat before it ends.

Return value

RecurrenceRule
Constructed recurrence rule.


+complexWeekly

Constructs a complex weekly recurrence rule.

static complexWeekly(interval: number, daysOfTheWeek: [number], setPositions: [number]): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every week and a value of 3 specifies that the rule should repeat every third week.

The setPositions filters which recurrences to include in the rule's frequency. For example, a yearly recurrence rule that has a daysOfTheWeek value that specifies Monday through Friday and setPositions contain 2 and -1, occurs only on the second weekday and last weekday of every year.

Parameters

interval
number
Interval at which to repeat the rule.

daysOfTheWeek
[number]
Days of the week to repeat the rule. Values range from 1 to 7, with Sunday being 1.

setPositions
[number]
Filters which recurrences to include in the rule's frequency.

Return value

RecurrenceRule
Constructed recurrence rule.


+complexWeeklyEndDate

Constructs a complex weekly recurrence rule with an end date.

static complexWeeklyEndDate(interval: number, daysOfTheWeek: [number], setPositions: [number], endDate: Date): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every week and a value of 3 specifies that the rule should repeat every third week.

The setPositions filters which recurrences to include in the rule's frequency. For example, a yearly recurrence rule that has a daysOfTheWeek value that specifies Monday through Friday and setPositions contain 2 and -1, occurs only on the second weekday and last weekday of every year.

Parameters

interval
number
Interval at which to repeat the rule.

daysOfTheWeek
[number]
Days of the week to repeat the rule. Values range from 1 to 7, with Sunday being 1.

setPositions
[number]
Filters which recurrences to include in the rule's frequency.

endDate
Date
Date at which the recurrence rule should end.

Return value

RecurrenceRule
Constructed recurrence rule.


+complexWeeklyOccurrenceCount

Constructs a complex weekly recurrence rule with an occurrence count.

static complexWeeklyOccurrenceCount(interval: number, daysOfTheWeek: [number], setPositions: [number], occurrenceCount: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every week and a value of 3 specifies that the rule should repeat every third week.

The setPositions filters which recurrences to include in the rule's frequency. For example, a yearly recurrence rule that has a daysOfTheWeek value that specifies Monday through Friday and setPositions contain 2 and -1, occurs only on the second weekday and last weekday of every year.

Parameters

interval
number
Interval at which to repeat the rule.

daysOfTheWeek
[number]
Days of the week to repeat the rule. Values range from 1 to 7, with Sunday being 1.

setPositions
[number]
Filters which recurrences to include in the rule's frequency.

occurrenceCount
number
Number of times the rule should repeat before it ends.

Return value

RecurrenceRule
Constructed recurrence rule.


+complexMonthly

Constructs a complex monthly recurrence rule.

static complexMonthly(interval: number, daysOfTheWeek: [number], daysOfTheMonth: [number], setPositions: [number]): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every month and a value of 3 specifies that the rule should repeat every third month.

The setPositions filters which recurrences to include in the rule's frequency. For example, a yearly recurrence rule that has a daysOfTheWeek value that specifies Monday through Friday and setPositions contain 2 and -1, occurs only on the second weekday and last weekday of every year.

Parameters

interval
number
Interval at which to repeat the rule.

daysOfTheWeek
[number]
Days of the week to repeat the rule. Values range from 1 to 7, with Sunday being 1.

daysOfTheMonth
[number]
Days of the month to repeat the rule. Values range from 1 to 31 and from -1 to -31.

setPositions
[number]
Filters which recurrences to include in the rule's frequency.

Return value

RecurrenceRule
Constructed recurrence rule.


+complexMonthlyEndDate

Constructs a complex monthly recurrence rule with an end date.

static complexMonthlyEndDate(interval: number, daysOfTheWeek: [number], daysOfTheMonth: [number], setPositions: [number], endDate: Date): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every month and a value of 3 specifies that the rule should repeat every third month.

The setPositions filters which recurrences to include in the rule's frequency. For example, a yearly recurrence rule that has a daysOfTheWeek value that specifies Monday through Friday and setPositions contain 2 and -1, occurs only on the second weekday and last weekday of every year.

Parameters

interval
number
Interval at which to repeat the rule.

daysOfTheWeek
[number]
Days of the week to repeat the rule. Values range from 1 to 7, with Sunday being 1.

daysOfTheMonth
[number]
Days of the month to repeat the rule. Values range from 1 to 31 and from -1 to -31.

setPositions
[number]
Filters which recurrences to include in the rule's frequency.

endDate
Date
Date at which the recurrence rule should end.

Return value

RecurrenceRule
Constructed recurrence rule.


+complexMonthlyOccurrenceCount

Constructs a complex monthly recurrence rule with an occurrence count.

static complexMonthlyOccurrenceCount(interval: number, daysOfTheWeek: [number], daysOfTheMonth: [number], setPositions: [number], occurrenceCount: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every month and a value of 3 specifies that the rule should repeat every third month.

The setPositions filters which recurrences to include in the rule's frequency. For example, a yearly recurrence rule that has a daysOfTheWeek value that specifies Monday through Friday and setPositions contain 2 and -1, occurs only on the second weekday and last weekday of every year.

Parameters

interval
number
Interval at which to repeat the rule.

daysOfTheWeek
[number]
Days of the week to repeat the rule. Values range from 1 to 7, with Sunday being 1.

daysOfTheMonth
[number]
Days of the month to repeat the rule. Values range from 1 to 31 and from -1 to -31.

setPositions
[number]
Filters which recurrences to include in the rule's frequency.

occurrenceCount
number
Number of times the rule should repeat before it ends.

Return value

RecurrenceRule
Constructed recurrence rule.


+complexYearly

Constructs a complex yearly recurrence rule.

static complexYearly(interval: number, daysOfTheWeek: [number], monthsOfTheYear: [number], weeksOfTheYear: [number], daysOfTheYear: [number], setPositions: [number]): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every year and a value of 3 specifies that the rule should repeat every third year.

The setPositions filters which recurrences to include in the rule's frequency. For example, a yearly recurrence rule that has a daysOfTheWeek value that specifies Monday through Friday and setPositions contain 2 and -1, occurs only on the second weekday and last weekday of every year.

Parameters

interval
number
Interval at which to repeat the rule.

daysOfTheWeek
[number]
Days of the week to repeat the rule. Values range from 1 to 7, with Sunday being 1.

monthsOfTheYear
[number]
The months of the year to repeat the rule. Values range from 1 to 12.

weeksOfTheYear
[number]
The weeks of the year to repeat the rule. Values range from 1 to 53 and -1 to -53.

daysOfTheYear
[number]
The days of the year to repeat the rule. Values range from 1 to 366 and -1 to -366.

setPositions
[number]
Filters which recurrences to include in the rule's frequency.

Return value

RecurrenceRule
Constructed recurrence rule.


+complexYearlyEndDate

Constructs a complex yearly recurrence rule with an end date.

static complexYearlyEndDate(interval: number, daysOfTheWeek: [number], monthsOfTheYear: [number], weeksOfTheYear: [number], daysOfTheYear: [number], setPositions: [number], endDate: Date): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every year and a value of 3 specifies that the rule should repeat every third week.

The setPositions filters which recurrences to include in the rule's frequency. For example, a yearly recurrence rule that has a daysOfTheWeek value that specifies Monday through Friday and setPositions contain 2 and -1, occurs only on the second weekday and last weekday of every year.

Parameters

interval
number
Interval at which to repeat the rule.

daysOfTheWeek
[number]
Days of the week to repeat the rule. Values range from 1 to 7, with Sunday being 1.

monthsOfTheYear
[number]
The months of the year to repeat the rule. Values range from 1 to 12.

weeksOfTheYear
[number]
The weeks of the year to repeat the rule. Values range from 1 to 53 and -1 to -53.

daysOfTheYear
[number]
The days of the year to repeat the rule. Values range from 1 to 366 and -1 to -366.

setPositions
[number]
Filters which recurrences to include in the rule's frequency.

endDate
Date
Date at which the recurrence rule should end.

Return value

RecurrenceRule
Constructed recurrence rule.


+complexYearlyOccurrenceCount

Constructs a complex yearly recurrence rule with an occurrence count.

static complexYearlyOccurrenceCount(interval: number, daysOfTheWeek: [number], monthsOfTheYear: [number], weeksOfTheYear: [number], daysOfTheYear: [number], setPositions: [number], occurrenceCount: number): RecurrenceRule

The interval should have a value greater than 0 and specifies how often the pattern repeats. For example, an interval of 1 specifies that the rule should repeat every year and a value of 3 specifies that the rule should repeat every third year.

The setPositions filters which recurrences to include in the rule's frequency. For example, a yearly recurrence rule that has a daysOfTheWeek value that specifies Monday through Friday and setPositions contain 2 and -1, occurs only on the second weekday and last weekday of every year.

Parameters

interval
number
Interval at which to repeat the rule.

daysOfTheWeek
[number]
Days of the week to repeat the rule. Values range from 1 to 7, with Sunday being 1.

monthsOfTheYear
[number]
The months of the year to repeat the rule. Values range from 1 to 12.

weeksOfTheYear
[number]
The weeks of the year to repeat the rule. Values range from 1 to 53 and -1 to -53.

daysOfTheYear
[number]
The days of the year to repeat the rule. Values range from 1 to 366 and -1 to -366.

setPositions
[number]
Filters which recurrences to include in the rule's frequency.

occurrenceCount
number
Number of times the rule should repeat before it ends.

Return value

RecurrenceRule
Constructed recurrence rule.