Skip to content
Titanium SDK
Version13.4.0

You are reading 13.4.0. See this page in 13.4.1.

Titanium.Calendar.RecurrenceRule

proxyAndroidiPhoneiPadmacOSsince Android 7.1.0, iPhone 3.1.0, iPad 3.1.0

Extends Titanium.Proxy

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

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.

In case of having daysOfTheWeek and daysOfTheMonth for an event with a recurrence rule of type RECURRENCEFREQUENCY_MONTHLY only [daysOfTheWeek] will be used.

Properties 13

apiName

Stringsince Android 3.2.0, iPhone 3.2.0, iPad 3.2.0, macOS 9.2.0read-only

Inherited from Titanium.Proxy

The name of the API that this proxy corresponds to.

bubbleParent

Booleansince Android 3.0.0, iPhone 3.0.0, iPad 3.0.0, macOS 9.2.0

Inherited from Titanium.Proxy

Indicates if the proxy will bubble an event to its parent.

Default: true

calendarID

Stringread-only

Identifier for the recurrence rule's calendar.

daysOfTheMonth

Array<Number>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.

daysOfTheWeek

Array<daysOfTheWeekDictionary>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.

daysOfTheYear

Array<Number>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.

end

recurrenceEndDictionaryread-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 endDateoroccurrenceCount` property will be present.

interval

Numberread-only

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.

Default: 1

monthsOfTheYear

Array<Number>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.

setPositions

Array<Number>iPhoneiPadmacOSread-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 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

Array<Number>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.

Methods 4

Inherited from Titanium.Proxy

Adds the specified callback as an event listener for the named event.

Parameters
ParametersTypeDescription
nameString

Name of the event.

callbackCallback<Titanium.Event>

Callback function to invoke when the event is fired.

4 fields
bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.

Inherited from Titanium.Proxy

Fires a synthesized event to any registered listeners.

Parameters
ParametersTypeDescription
nameString

Name of the event.

event?Dictionary

A dictionary of keys and values to add to the Titanium.Event object sent to the listeners.

Inherited from Titanium.Proxy

Removes the specified callback as an event listener for the named event.

Parameters
ParametersTypeDescription
nameString

Name of the event.

callbackCallback<Titanium.Event>

Callback function to remove. Must be the same function passed to addEventListener.

4 fields
bubbles Boolean

True if the event will try to bubble up if possible.

cancelBubble Boolean

Set to true to stop the event from bubbling.

source Object

Source object that fired the event.

type String

Name of the event fired.