-
-
Notifications
You must be signed in to change notification settings - Fork 517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite loop on rule.between() #481
Comments
3 tasks
I've created a PR to fix this, but you can also get around the issue by ensuring your interval is not
|
const rule = new RRule({
freq: RRule.DAILY,
interval: 1,
byweekday: RRule.TU,
dtstart: new Date('2021-09-14T09:00:00.000Z'),
until: new Date('2021-09-18T10:56:00.472Z'),
});
console.log(rule);
console.log("between", rule.between(new Date('2021-09-17T09:56:00.472Z'), new Date('2021-09-17T10:56:00.472Z'))) results in RRule {
_cache: Cache { all: false, before: [], after: [], between: [] },
origOptions: {
freq: 3,
interval: 1,
byweekday: Weekday { weekday: 1, n: undefined },
dtstart: 2021-09-14T09:00:00.000Z,
until: 2021-09-18T10:56:00.472Z
},
options: {
freq: 3,
dtstart: 2021-09-14T09:00:00.000Z,
interval: 1,
wkst: 0,
count: null,
until: 2021-09-18T10:56:00.472Z,
tzid: null,
bysetpos: null,
bymonth: null,
bymonthday: [],
bynmonthday: [],
byyearday: null,
byweekno: null,
byweekday: [ 1 ],
bynweekday: null,
byhour: [ 9 ],
byminute: [ 0 ],
bysecond: [ 0 ],
byeaster: null
}
}
between [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm stucked in an infinite loop caaling the rrule.between(date1, date2) with the following rrule:
2021-09-17T10:56:00.472Z 2021-09-17T09:56:00.472Z 2021-09-18T10:56:00.472Z
console.log(rule):
Then calling:
I get the Infinite loop here on debugging:
Package version: 2.6.8
OS: macOS Big Sur 11.4
The text was updated successfully, but these errors were encountered: