rrule icon indicating copy to clipboard operation
rrule copied to clipboard

[bug] Decimal interval creates an infinite loop

Open reekoz opened this issue 1 year ago • 2 comments

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')

reekoz avatar Oct 24 '23 08:10 reekoz

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

2023-10-24_11-18

robertsLando avatar Oct 24 '23 09:10 robertsLando

Decimal intervals aren't supported in this library. Would accept a PR that validates interval format.

davidgoli avatar Nov 10 '23 20:11 davidgoli