v7.3.0

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.

Useful configs and functions

Member Description
frequency Repeat frequency (DAILY, WEEKLY, etc.)
interval Interval between occurrences
endDate Recurrence end date
count Maximum number of occurrences
days Days of the week for weekly recurrence
monthDays Days of the month for monthly recurrence
months Months for yearly recurrence

See also

No results

Fields

Fields belong to a Model class and define the Model data structure
  • 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.

  • 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.

  • frequency : 'DAILY'/'WEEKLY'/'MONTHLY'/'YEARLY'

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

  • 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.

  • 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.

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

  • 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.

Properties

Properties are getters/setters or publicly accessible variables on this class

Functions

Functions are methods available for calling on the class
    • sanitize( )
      private

      Cleans up fields that do not make sense for the current frequency value.

    Source path

    Scheduler/model/RecurrenceModel.js

    Contents