Skip to content

@eightkk/vue-weave / core / parseRecurrenceRule

Function: parseRecurrenceRule() ​

parseRecurrenceRule(text, options?): RecurrenceRule

Defined in: src/core/recurrence.ts:243

Parse RFC 5545 RRULE text, with or without the RRULE: prefix, into a RecurrenceRule. Part names are case-insensitive. Supported: FREQ (DAILY, WEEKLY, MONTHLY, YEARLY), INTERVAL, COUNT, UNTIL, BYDAY (with ordinals such as 2MO and -1FR for MONTHLY and YEARLY), BYMONTHDAY (also negative), BYMONTH, BYSETPOS and WKST.

UNTIL may be UTC (20261231T235959Z), a floating date-time or a date; a floating date-time is read in options (an IANA timeZone or utcOffsetMinutes, default UTC), and a date includes the whole local day (it becomes one millisecond before the next local midnight).

Throws an Error for text that is not a rule, a missing FREQ, a repeated or unknown part, the unsupported FREQ values SECONDLY, MINUTELY and HOURLY, the unsupported parts BYSECOND, BYMINUTE, BYHOUR, BYYEARDAY, BYWEEKNO, RSCALE and SKIP, and invalid combinations (COUNT with UNTIL, BYDAY ordinals outside MONTHLY and YEARLY, BYMONTHDAY with WEEKLY, BYSETPOS alone); a RangeError for numbers out of range.

Parameters ​

text ​

string

options? ​

RecurrenceZoneOptions = {}

Returns ​

RecurrenceRule

Released under the MIT License.