# 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.*

The interval should have a value greater than 0 and specifies how often the 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.

```
static daily(interval: number): RecurrenceRule
```

### +dailyEndDate¶

*Constructs a daily recurrence rule with an end date.*

The interval should have a value greater than 0 and specifies how often the 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.

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

### +dailyOccurrenceCount¶

*Constructs a daily recurrence rule with an occurrence count.*

The interval should have a value greater than 0 and specifies how often the 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.

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

### +weekly¶

*Constructs a weekly recurrence rule.*

The interval should have a value greater than 0 and specifies how often the 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.

```
static weekly(interval: number): RecurrenceRule
```

### +weeklyEndDate¶

*Constructs a weekly recurrence rule with an end date.*

The interval should have a value greater than 0 and specifies how often the 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.

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

### +weeklyOccurrenceCount¶

*Constructs a weekly recurrence rule with an occurrence count.*

The interval should have a value greater than 0 and specifies how often the 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.

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

### +monthly¶

*Constructs a monthly recurrence rule.*

The interval should have a value greater than 0 and specifies how often the 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.

```
static monthly(interval: number): RecurrenceRule
```

### +monthlyEndDate¶

*Constructs a monthly recurrence rule with an end date.*

The interval should have a value greater than 0 and specifies how often the 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.

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

### +monthlyOccurrenceCount¶

*Constructs a monthly recurrence rule with an occurrence count.*

The interval should have a value greater than 0 and specifies how often the 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.

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

### +yearly¶

*Constructs a yearly recurrence rule.*

The interval should have a value greater than 0 and specifies how often the 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.

```
static yearly(interval: number): RecurrenceRule
```

### +yearlyEndDate¶

*Constructs a yearly recurrence rule with an end date.*

The interval should have a value greater than 0 and specifies how often the 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.

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

### +yearlyOccurrenceCount¶

*Constructs a yearly recurrence rule with an occurrence count.*

The interval should have a value greater than 0 and specifies how often the 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.

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

### +complexWeekly¶

*Constructs a complex weekly recurrence rule.*

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.

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

### +complexWeeklyEndDate¶

*Constructs a complex weekly recurrence rule with an end date.*

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.

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

### +complexWeeklyOccurrenceCount¶

*Constructs a complex weekly recurrence rule with an occurrence count.*

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.

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

### +complexMonthly¶

*Constructs a complex monthly recurrence rule.*

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

### +complexMonthlyEndDate¶

*Constructs a complex monthly recurrence rule with an end date.*

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

### +complexMonthlyOccurrenceCount¶

*Constructs a complex monthly recurrence rule with an occurrence count.*

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

### +complexYearly¶

*Constructs a complex yearly recurrence rule.*

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

### +complexYearlyEndDate¶

*Constructs a complex yearly recurrence rule with an end date.*

The interval should have a value greater than 0 and specifies how often the 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.

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

### +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
```