RecurrenceModel

This class encapsulates the recurrence information of a RecurringTimeSpan. The rule describes how the timespan will repeat, and is based on RFC-5545.

Examples:

const recurrenceModel = new RecurrenceModel();
// every weekday
recurrenceModel.rule = 'FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR';

// every other week
recurrenceModel.rule = 'FREQ=WEEKLY;INTERVAL=2';

// every 5th day, until May 31st, 2025
recurrenceModel.rule = 'FREQ=DAILY;INTERVAL=5;UNTIL=20250531T000000';

It is a subclass of Model class. Please refer to the documentation for that class to become familiar with the base interface of this class.

The data source for the fields in this class can be customized by subclassing this class.

Properties

64

Class hierarchy

isRecurrenceModel: Boolean= truereadonly
Identifies an object as an instance of RecurrenceModel class, or subclass thereof.
isRecurrenceModel: Boolean= truereadonlystatic
Identifies an object as an instance of RecurrenceModel class, or subclass thereof.
isModelModel
isModelLinkModelLink
isModelStmModelStm
isTreeNodeTreeNode

Other

rule: String

The recurrence rule. A string in RFC-5545 described format ("RRULE" expression).

The timespan this recurrence is associated with.

$namestaticModel
relationsstaticModel

Editing

copyOfModel
isValidModel

Fields

allFieldsstaticModel
autoExposeFieldsstaticModel
childrenFieldstaticModel
defaultsstaticModel
fieldMapstaticModel
fieldsstaticModel
idFieldstaticModel

Grouping

Identification

keyModel

JSON

jsonModel

Lifecycle

configBase

Linked records

hasLinksModelLink
isLinkedModelLink
recordLinksModelLink

Misc

stmModelStm

Parent & children

allChildrenTreeNode
childLevelTreeNode
firstChildTreeNode
isLeafTreeNode
isLoadedTreeNode
isParentTreeNode
isRootTreeNode
lastChildTreeNode
nextSiblingTreeNode
parentTreeNode
parentIdTreeNode

Functions

54

Configuration

applyDefaultsstaticBase

Editing

copyModel
getDataModel
removeModel
setModel

Events

Fields

addFieldstaticModel
getModel
processFieldstaticModel
removeFieldstaticModel

Identification

asIdstaticModel
generateIdstaticModel

JSON

toJSONModel

Lifecycle

destroystaticBase

Misc

equalsModel
initClassstaticBase
isOfTypeNamestaticBase
linkModelLink
mixinstaticBase

Other

Parent & children

appendChildTreeNode
bubbleTreeNode
bubbleWhileTreeNode
containsTreeNode
insertChildTreeNode
isExpandedTreeNode
removeChildTreeNode
traverseTreeNode

Typedefs

1

Fields

8
count: Number

Specifies the number of occurrences after which the recurrence ends. The value includes the associated timespan itself so values less than 2 make no sense. The field is optional, the recurrence as well can be stopped using endDate field value.

days: String[]

Specifies days of the week on which the timespan should occur. An array of string values SU, MO, TU, WE, TH, FR, SA corresponding to Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday days of the week. Each value can also be preceded by a positive (+n) or negative (-n) integer. If present, this indicates the nth occurrence of a specific day within the monthly or yearly recurrence.

Not applicable for daily frequency.

endDate: Date

End date of the recurrence. Specifies when the recurrence ends. The value is optional, the recurrence can as well be stopped using count field value.

Field defines the recurrence frequency. Supported values are: DAILY, WEEKLY, MONTHLY, YEARLY.

interval: Number

Field defines how often the recurrence repeats. For example, if the recurrence is weekly its interval is 2, then the timespan repeats every two weeks.

monthDays: Number[]

Specifies days of the month on which the timespan should occur. An array of integer values (-31..-1 - +1..+31, negative values mean counting backwards from the month end). Applicable only for monthly and yearly frequency.

months: Number[]

Specifies months of the year on which the timespan should occur. An array of integer values (1 - 12). Applicable only for yearly frequency.

positions: Number[]

The positions to include in the recurrence. The values operate on a set of recurrence instances in one interval of the recurrence rule. An array of integer values (valid values are 1 to 366 or -366 to -1, negative values mean counting backwards from the end of the built list of occurrences). Not applicable for daily frequency.