FraserHamilton / dayjs-recur

Day.js plugin for matching and generating recurring dates.
https://www.npmjs.com/package/dayjs-recur
MIT License
9 stars 2 forks source link

Support RRULE standard #18

Open leog opened 1 year ago

leog commented 1 year ago

It would be awesome if this plugin could support RRULE standard to be able to pass down the RRULE string and operate with the correspondent generated recurring events.

For example:

// Create a recurrence using today as the start date.
const recurrence = dayjs().recur("FREQ=DAILY;INTERVAL=2;COUNT=4");
// Or
const recurrence = dayjs().recur({
  freq: "DAILY",
  interval: 2,
  count: 4
});
// Outputs: ["2022-10-21T13:50:00.000Z", "2022-10-23T13:50:00.000Z", "2022-10-25T13:50:00.000Z", "2022-10-27T13:50:00.000Z"]
const allDates = recurrence.all();