rrule
rrule copied to clipboard
[bug] Decimal interval creates an infinite loop
Minimal repro script:
const { rrulestr } = require("rrule")
const from = new Date("2023-10-24T08:32:21.533Z")
const to = new Date("2023-11-01T08:32:21.533Z")
const rrule = rrulestr('DTSTART:20231003T040000Z\nRRULE:FREQ=DAILY;INTERVAL=0.5')
const dates = rrule.between(from, to, true)
// This line is never reached
console.log('dates', dates, '\n\n')
The same can be reproduced from: http://jkbrzt.github.io/rrule/ by selecting RRULE String in tab and set a decimal interval. The page stops responding
Decimal intervals aren't supported in this library. Would accept a PR that validates interval format.