Open domicode opened 1 year ago
I am creating a recurring rule in my JavaScript, however the Rule.all() behaves differently if I pass the generated string or call the method directly. Code snippet:
Rule.all()
const rule = new RRule({ freq, dtstart: datetime(from.year(), from.month() + 1, from.date(), from.hour(), from.minute()), interval: this.recurringInterval, wkst: RRule.MO, count: 3, byweekday: this.weekdayOption }); console.log(rule.toString()); console.log(rule.all()); console.log(RRule.fromString(rule.toString()).all());
Output rule string:
DTSTART:20230404T080000Z RRULE:FREQ=WEEKLY;INTERVAL=1;WKST=MO;COUNT=3
Output rule.all()
rule.all()
0 : Tue Apr 04 2023 10:00:00 GMT+0200 (Central European Summer Time) {} 1 : Wed Apr 05 2023 10:00:00 GMT+0200 (Central European Summer Time) {} 2 : Thu Apr 06 2023 10:00:00 GMT+0200 (Central European Summer Time) {}
Output rule.all() after passing the string
0 : Tue Apr 04 2023 10:00:00 GMT+0200 (Central European Summer Time) {} 1 : Tue Apr 11 2023 10:00:00 GMT+0200 (Central European Summer Time) {} 2 : Tue Apr 18 2023 10:00:00 GMT+0200 (Central European Summer Time) {}
rrule
May have something to do with this?
https://github.com/jkbrzt/rrule/issues/523
I am creating a recurring rule in my JavaScript, however the
Rule.all()
behaves differently if I pass the generated string or call the method directly. Code snippet:Output rule string:
Output
rule.all()
Output
rule.all()
after passing the stringrrule
you are using: 2.7.2