expression |
string
|
object
|
|
Indicates the recurrence-expression to parse, as:
- a string of "rule=value;..." RRULE format, as defined in RFC 5545. The rules can be in any order, separated by ; (semi-colon) character and could be as follows:
- FREQ, {string} The FREQ rule part identifies the type of recurrence rule. This rule part MUST be specified in the recurrence rule.
The valid values are "SECONDLY", "MINUTELY", "HOURLY", "DAILY", "WEEKLY", "MONTHLY" and "YEARLY", as explained:
- SECONDLY, to specify repeating events based on an interval of a second or more
- MINUTELY, to specify repeating events based on an interval of a minute or more
- HOURLY, to specify repeating events based on an interval of an hour or more
- DAILY, to specify repeating events based on an interval of a day or more
- WEEKLY, to specify repeating events based on an interval of a week or more
- MONTHLY, to specify repeating events based on an interval of a month or more
- YEARLY, to specify repeating events based on an interval of a year or more
For example, "FREQ=DAILY;" indicates a daily recurrence rule.
- DTSTART, {Date} The DTSTART rule specifies the date the recurrence starts from, in YYYYMMDD[THHNNSS[Z]] format. If missing the current date and time is used.
The format supports:
- DATE format, as YYYYMMDD (for example, 20220101 indicates January 1st, 2022)
- DATE-TIME format, as YYYYMMDDTHHNNSS (for example, 20220101T090000 indicates January 1st, 2022, at 09:00 AM local time)
- DATE-TIME in UTC format, as YYYYMMDDTHHNNSSZ (for example, 20220101T090000Z indicates January 1st, 2022, at 09:00 AM UTC)
where:
- YYYY indicates the year
- MM indicates the month (01 = January, 02 = February, ..., 12 = December)
- DD indicates the day of the month (01 through 31)
- T character is used to separate the date and time portions of the value
- HH indicates the hour (00 through 23)
- NN indicates the minute (00 through 59)
- SS indicates the second (00 through 60)
- Z character indicates that the time is in UTC format.
For example, "FREQ=DAILY;DTSTART=20220101T090000Z;" indicates a daily recurrence rule starting from January 1st, 2022, at 09:00 AM UTC.
- INTERVAL {number} The INTERVAL rule part contains a positive integer representing at which intervals the recurrence rule repeats.
The default value is "1", meaning:
- every 1 second for a SECONDLY rule
- every 1 minute for a MINUTELY rule
- every 1 hour for an HOURLY rule
- every 1 day for a DAILY rule
- every 1 week for a WEEKLY rule
- every 1 month for a MONTHLY rule
- every 1 year for a YEARLY rule
For example, "FREQ=DAILY;INTERVAL=8" indicates a recurrence rule every eight days
- COUNT, {number} The COUNT rule part defines the number of occurrences at which to range-bound the recurrence. The DTSTART property value always counts as the first occurrence. The COUNT rule part is a positive integer.
For example, "FREQ=DAILY;COUNT=10" indicates a recurrence rule for 10 times
- WKST, {string} The WKST rule part specifies the day on which the workweek starts. The default value is MO. The WKST rule part is significant when a WEEKLY "RRULE" has an interval greater than 1, and a BYDAY rule part is specified. This is also significant when in a YEARLY "RRULE" when a BYWEEKNO rule part is specified.
Valid values are:
- MO, for Monday
- TU, for Tuesday
- WE, for Wednesday
- TH, for Thursday
- FR, for Friday
- SA, for Saturday
- SU, for Sunday
For example, "FREQ=WEEKLY;WKST=SU" indicates a weekly recurrence rule where the week starts on Sunday
- UNTIL, {Date} The UNTIL rule part defines a DATE or DATE-TIME value that bounds the recurrence rule in an inclusive manner. If the value specified by UNTIL is synchronized with the specified recurrence, this DATE or DATE-TIME becomes the last instance of the recurrence.
The format of UNTIL is YYYYMMDD[THHNNSS[Z]], supporting:
- DATE format, as YYYYMMDD (for example, 20220101 indicates January 1st, 2022)
- DATE-TIME format, as YYYYMMDDTHHNNSS (for example, 20220101T090000 indicates January 1st, 2022, at 09:00 AM local time)
- DATE-TIME in UTC format, as YYYYMMDDTHHNNSSZ (for example, 20220101T090000Z indicates January 1st, 2022, at 09:00 AM UTC)
where:
- YYYY indicates the year
- MM indicates the month (01 = January, 02 = February, ..., 12 = December)
- DD indicates the day of the month (01 through 31)
- T character is used to separate the date and time portions of the value
- HH indicates the hour (00 through 23)
- NN indicates the minute (00 through 59)
- SS indicates the second (00 through 60)
- Z character indicates that the time is in UTC format.
For example, "FREQ=DAILY;UNTIL=20220110T090000Z" indicates a daily recurrence rule until January 10th, 2022, at 09:00 AM UTC.
- BYWEEKNO, {string} The BYWEEKNO rule part specifies a COMMA-separated list of ordinals specifying weeks of the year. Valid values are 1 to 53 or -53 to -1. The week numbering follows the ISO 8601 standard, where the first week of the year is the week that contains the first Thursday of the year. For example, week number 1 is the week with the first Thursday in January. Week number 52 is the week with the last Thursday in December. Week number 53 is only used in years where January 1st is a Thursday or a leap year where January 1st is a Wednesday. The BYWEEKNO rule part MUST NOT be specified when the FREQ rule part is set to DAILY, WEEKLY, or MONTHLY.
For example, "FREQ=YEARLY;BYWEEKNO=20,30" indicates a yearly recurrence rule on the 20th and 30th weeks of the year
- BYDAY, {string} The BYDAY rule part specifies a COMMA-separated list of days of the week. Each BYDAY value can also be preceded by a positive (+n) or negative (-n) integer. If present, this indicates the nth occurrence of the specific day within the MONTHLY or YEARLY "RRULE". For example, within a MONTHLY rule, +1MO indicates the first Monday of the month, whereas -1MO indicates the last Monday of the month. Within a YEARLY rule, +3TU indicates the third Tuesday of the year. Valid values for n are 1 to 5 or -5 to -1. The BYDAY rule part MUST NOT be specified when the FREQ rule part is set to DAILY.
Valid values are:
- MO, for Monday
- TU, for Tuesday
- WE, for Wednesday
- TH, for Thursday
- FR, for Friday
- SA, for Saturday
- SU, for Sunday
For example, "FREQ=WEEKLY;BYDAY=MO,WE,FR" indicates a weekly recurrence rule on Monday, Wednesday and Friday
- BYMONTHDAY, {string} The BYMONTHDAY rule part specifies a COMMA-separated list of days of the month. Valid values are 1 to 31 or -31 to -1. For example, -10 represents the tenth to the last day of the month. The BYMONTHDAY rule part MUST NOT be specified when the FREQ rule part is set to WEEKLY.
For example, "FREQ=MONTHLY;BYMONTHDAY=15,-1" indicates a monthly recurrence rule on the 15th and the last day of the month
- BYYEARDAY, {string} The BYYEARDAY rule part specifies a COMMA-separated list of days of the year. Valid values are 1 to 366 or -366 to -1. For example, -1 represents the last day of the year (December 31st) and -306 represents the 306th to the last day of the year (March 1st). The BYYEARDAY rule part MUST NOT be specified when the FREQ rule part is set to DAILY, WEEKLY, or MONTHLY.
For example, "FREQ=YEARLY;BYYEARDAY=100,200" indicates a yearly recurrence rule on the 100th and 200th days of the year
- BYSETPOS, {string} The BYSETPOS rule part specifies a COMMA-separated list of values that corresponds to the nth occurrence within the set of recurrence instances specified by the rule. BYSETPOS operates on a set of recurrence instances in one interval of the recurrence rule. For example, in a WEEKLY rule, the interval would be one week A set of recurrence instances starts at the beginning of the interval defined by the FREQ rule part. Valid values are 1 to 366 or -366 to -1. It MUST only be used in conjunction with another BYxxx rule part. For example "the last work day of the month" could be represented as: FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1 Each BYSETPOS value can include a positive (+n) or negative (-n) integer. If present, this indicates the nth occurrence of the specific occurrence within the set of occurrences specified by the rule.
For example, "FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1" indicates a monthly recurrence rule on the last work day of the month
- BYMONTH, {string} The BYMONTH rule part specifies a COMMA-separated list of months of the year. Valid values are 1 to 12.
For example, "FREQ=YEARLY;BYMONTH=1,6,12" indicates a yearly recurrence rule on January, June and December
- BYHOUR, {string} The BYHOUR rule part specifies a COMMA-separated list of hours of the day. Valid values are 0 to 23.
For example, "FREQ=DAILY;BYHOUR=9,14,18" indicates a daily recurrence rule at 09:00 AM, 02:00 PM and 06:00 PM
- BYMINUTE, {string} The BYMINUTE rule part specifies a COMMA-separated list of minutes within an hour. Valid values are 0 to 59.
For example, "FREQ=HOURLY;BYMINUTE=0,30" indicates an hourly recurrence rule at minute 0 and minute 30 of each hour
- BYSECOND, {string} The BYSECOND rule part specifies a COMMA-separated list of seconds within a minute. Valid values are 0 to 60.
For example, "FREQ=MINUTELY;BYSECOND=0,15,30,45" indicates a minutely recurrence rule at second 0, second 15, second 30 and second 45 of each minute
- an object of {dtstart, freq, until, count, interval, bysecond, byminute, byhour, byday, bymonthday, byyearday, byweekno, bymonth, bysetpos, wkst} type, where:
- dtstart {Date}, specifies the date the recurrence starts from (in YYYYMMDD[THHNNSS[Z]] format)
- freq {string}, specifies the frequency of the recurrence rule. Valid values include "SECONDLY", "MINUTELY", "HOURLY", "DAILY", "WEEKLY", "MONTHLY" and "YEARLY"
- until {Date}, specifies the date that bounds the recurrence rule in an inclusive manner (in YYYYMMDD[THHNNSS[Z]] format)
- count {number}, specifies the number of occurrences at which to range-bound the recurrence
- interval {number}, specifies a positive integer representing at which intervals the recurrence rule repeats
- bysecond {string}, specifies a COMMA-separated list of seconds within a minute (valid values are 0 to 60)
- byminute {string}, specifies a COMMA-separated list of minutes within an hour (valid values are 0 to 59)
- byhour {string}, specifies a COMMA-separated list of hours of the day (valid values are 0 to 23)
- byday {string}, specifies a COMMA-separated list of days of the week (each BYDAY value can also be preceded by a positive (+n) or negative (-n) integer)
- bymonthday {string}, specifies a COMMA-separated list of days of the month (valid values are 1 to 31 or -31 to -1)
- byyearday {string}, specifies a COMMA-separated list of days of the year (valid values are 1 to 366 or -366 to -1)
- byweekno {string}, specifies a COMMA-separated list of ordinals specifying weeks of the year (valid values are 1 to 53 or -53 to -1)
- bymonth {string}, specifies a COMMA-separated list of months of the year (valid values are 1 to 12)
- bysetpos {string}, specifies a COMMA-separated list of values that corresponds to the nth occurrence within the set of recurrence instances specified by the rule (valid values are 1 to 366 or -366 to -1)
- wkst {string}, specifies the day on which the workweek starts (valid values are "MO", "TU", "WE", "TH", "FR", "SA" and "SU")
|