# Titanium.Calendar.RecurrenceRule

> An object that is used to describe the recurrence pattern for a recurring event.

- Source: https://titaniumsdk.com/docs/sdk/13.0.1/Titanium.Calendar.RecurrenceRule
- Titanium SDK version: 13.0.1
- Kind: proxy
- Platforms: Android, iPhone, iPad, macOS
- Since: Titanium SDK Android 7.1.0, iPhone 3.1.0, iPad 3.1.0
- Extends: Titanium.Proxy
- Inheritance: Titanium.Proxy

On Android there is no option to have multiple recurrence rules set for the same event.
Android always uses only the first element in the array passed to [recurrenceRules](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.Event.md#recurrenceRules).

In case of having [daysOfTheWeek](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.RecurrenceRule.md#daysOfTheWeek) and [daysOfTheMonth](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.RecurrenceRule.md#daysOfTheWeek)
for an event with a recurrence rule of type [RECURRENCEFREQUENCY_MONTHLY](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.md#RECURRENCEFREQUENCY_MONTHLY) only
[daysOfTheWeek] will be used.

## Properties

### calendarID

- Type: String
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

Identifier for the recurrence rule's calendar.

### daysOfTheMonth

- Type: Array<Number>
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

The days of the month that the event occurs, as an array of number objects.
Values can be from 1 to 31 and from -1 to -31. This parameter is only valid for
recurrence rules of type
[RECURRENCEFREQUENCY_MONTHLY](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.md#RECURRENCEFREQUENCY_MONTHLY).

### daysOfTheWeek

- Type: Array<daysOfTheWeekDictionary>
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

The days of the week that the event occurs, as an array of objects `daysOfWeek` and `Week`.

On Android daysOfTheWeek is not valid for recurrence rules of type
[RECURRENCEFREQUENCY_YEARLY](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.md#RECURRENCEFREQUENCY_YEARLY).

### daysOfTheYear

- Type: Array<Number>
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

The days of the year that the event occurs, as an array of number objects.
Values can be from 1 to 366 and from -1 to -366. This parameter is only valid for
recurrence rules of type [RECURRENCEFREQUENCY_YEARLY](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.md#RECURRENCEFREQUENCY_YEARLY).

### end

- Type: recurrenceEndDictionary
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

End of a recurrence rule.

The recurrence end can be specified by a date (date-based) or by a maximum count
of occurrences (count-based). An event which is set to never end **should not**
have its `recurrenceEnd set. Either `endDate` or `occurrenceCount` property will be
present.

### frequency

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

Frequency of the recurrence rule.

Accepts: `Titanium.Calendar.RECURRENCEFREQUENCY_DAILY`, `Titanium.Calendar.RECURRENCEFREQUENCY_MONTHLY`, `Titanium.Calendar.RECURRENCEFREQUENCY_WEEKLY`, `Titanium.Calendar.RECURRENCEFREQUENCY_YEARLY`

### interval

- Type: Number
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only
- Default: `1`

The interval between instances of this recurrence. For example, a weekly
recurrence rule with an interval of 2 occurs every other week. Must be greater than 0.

### monthsOfTheYear

- Type: Array<Number>
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

The months of the year that the event occurs, as an array of Number objects.
Values can be from 1 to 12. This parameter is only valid for recurrence rules of
type [RECURRENCEFREQUENCY_YEARLY](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.md#RECURRENCEFREQUENCY_YEARLY).

### setPositions

- Type: Array<Number>
- Platforms: iPhone, iPad, macOS
- Permission: read-only

An array of ordinal numbers that filters which recurrences to include in the
recurrence rule's frequency. For example, a yearly recurrence rule that has a
[daysOfTheWeek](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.RecurrenceRule.md#daysOfTheWeek) value that specifies
Monday through Friday, and a `setPositions` array containing 2 and -1, occurs only
on the second weekday and last weekday of every year.

### weeksOfTheYear

- Type: Array<Number>
- Platforms: Android, iPhone, iPad, macOS
- Permission: read-only

The weeks of the year that the event occurs, as an array of number objects.
Values can be from 1 to 53 and from -1 to -53. This parameter is only valid for
recurrence rules of type [RECURRENCEFREQUENCY_YEARLY](https://titaniumsdk.com/docs/sdk/Titanium.Calendar.md#RECURRENCEFREQUENCY_YEARLY).

## Inherited members

7 members are inherited. Each is documented on the type that declares it.

- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/13.0.1/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `lifecycleContainer`, `removeEventListener`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

