new IRecurOptions()
The IRecurOptions object defines the options to create IRecur objects. The options parameter of the IRecur constructor accepts an object of IRecurOptions type. It specifies the options to create IRecur objects, such as the ignoreUnknownRule field that specifies how unknown RRULE properties are handled. The valid() method of the IRecur object indicates whether the RRULE expression is valid. The error() method returns the corresponding error message, including the "Unknown RRULE property '...'" message when applicable.
Members
(static) ignoreUnknownRule :boolean
The ignoreUnknownRule field specifies how unknown RRULE properties are handled. The valid() method of the IRecur object indicates whether the RRULE expression is valid. The error() method returns the corresponding error message, including the "Unknown RRULE property '...'" message when applicable.
If ignoreUnknownRule is set:
-
false, any unrecognized rule generates an error in the form:
"Unknown RRULE property '...'"
where "..." represents the name of the unknown rule - true, any unknown rule is silently ignored and no error is raised.
By default, the ignoreUnknownRule field is set to true, which means that unknown rules are ignored and no error is raised.
The known rules are:
- FREQ, specifies the type of recurrence rule. Valid values are SECONDLY, MINUTELY, HOURLY, DAILY, WEEKLY, MONTHLY and YEARLY
- UNTIL, specifies the end date of the recurrence rule. The value of UNTIL rule must be a date-time value in UTC time format (for instance, 19971224T000000Z for December 24th, 1997 at 00:00:00 UTC time)
- COUNT, specifies the number of occurrences for the recurrence rule. The value of COUNT rule must be a positive integer
- INTERVAL, specifies the interval between each freq rule. The value of INTERVAL rule must be a positive integer. For instance, with FREQ=MONTHLY, INTERVAL=2 means every 2 months
- BYDAY, specifies a list of days of the week. The value of BYDAY rule must be a comma-separated list of days of the week, each day can be specified as a weekday (SU, MO, TU, WE, TH, FR or SA) or as an ordinal weekday (for instance, -2TU for the second to last Tuesday of the month)
- BYMONTHDAY, specifies a list of days of the month. The value of BYMONTHDAY rule must be a comma-separated list of days of the month (from 1 to 31 or from -31 to -1, for instance, -1 for the last day of the month)
- BYYEARDAY, specifies a list of days of the year. The value of BYYEARDAY rule must be a comma-separated list of days of the year (from 1 to 366 or from -366 to -1, for instance, -1 for the last day of the year)
- BYWEEKNO, specifies a list of weeks of the year. The value of BYWEEKNO rule must be a comma-separated list of weeks of the year (from 1 to 53 or from -53 to -1, for instance, -1 for the last week of the year)
- BYMONTH, specifies a list of months of the year. The value of BYMONTH rule must be a comma-separated list of months of the year (from 1 to 12)
- BYSETPOS, specifies a list of values that corresponds to the nth occurrence within the set of recurrence instances specified by the FREQ and other rules. The value of BYSETPOS rule must be a comma-separated list of integers (from 1 to the total number of occurrences within the recurrence set or from -1 to the negative of the total number of occurrences within the recurrence set, for instance, -1 for the last occurrence within the recurrence set)
- WKST, specifies the day on which the workweek starts. The value of WKST rule must be a weekday (SU, MO, TU, WE, TH, FR or SA)
- DTSTART, specifies the start date of the recurrence rule. The value of DTSTART rule must be a date-time value in UTC time format (for instance, 19971224T000000Z for December 24th, 1997 at 00:00:00 UTC time)
- BYSECOND, specifies a list of seconds within a minute. The value of BYSECOND rule must be a comma-separated list of seconds (from 0 to 60)
- BYMINUTE, specifies a list of minutes within an hour. The value of BYMINUTE rule must be a comma-separated list of minutes (from 0 to 59)
- BYHOUR, specifies a list of hours within a day. The value of BYHOUR rule must be a comma-separated list of hours (from 0 to 23)
Type:
- boolean
Example
false {boolean}, unknown rules fire the "Unknown RRULE property '...'" error
true {boolean}, unknown rules are ignored
ignoreUnknownRule