If this is expected behavior, please document it. However, I would expect an empty array to be treated the same way as not giving the option or at least .count() being 0. But if byweekday == [], then all days are in the rrule, which is definitely not obvious.
[x] Verify that you've looked through existing issues for duplicates before
creating a new one
[x] Code sample reproducing the issue. Be sure to include all input values you
are using such as the exact RRule string and dates.
const dtstart = new Date(Date.UTC(2023, 8, 15, 3, 0, 0));
const until = new Date(Date.UTC(2023, 8, 22, 3, 0, 0));
const rule1 = new RRule({
freq: RRule.WEEKLY,
dtstart,
until,
interval: 1,
byweekday: []
});
const rule2 = new RRule({
freq: RRule.WEEKLY,
dtstart,
until,
interval: 1
});
console.log(rule2.count() == rule1.count());
[x] Expected output
true
[x] Actual output
false
[x] The version of rrule you are using
2.7.1
[x] Your operating system
Arch Linux
[x] Your local timezone (run $ date from the command line
of the machine showing the bug)
CEST
If this is expected behavior, please document it. However, I would expect an empty array to be treated the same way as not giving the option or at least
.count()
being 0. But ifbyweekday == []
, then all days are in the rrule, which is definitely not obvious.rrule
you are using 2.7.1$ date
from the command line of the machine showing the bug) CEST