Thank you for taking an interest in rrule! Please include the following in
your report:
[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.
[X] Expected output
[X] Actual output
[X] The version of rrule you are using
Using rrule 2.6.6
[X] Your operating system
OSX
[X] Your local timezone (run $ date from the command line
of the machine showing the bug)
Asia/Singapore
When calling after with a date in the past, on a rrule without DTSTART, the result is not the expected:
const now = new Date('2020-03-01T10:30:00.000Z');
const rule = RRule.fromString('RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=1');
const ruleWithDTSTART = RRule.fromString('RRULE:FREQ=MONTHLY;INTERVAL=1;DTSTART=20200101T103000Z');
const next = rule.after(now);
const nextWithDTSTART = ruleWithDTSTART.after(now);
In this example, from my understanding the value of next and nextWithDTSTART should be the same.
But in reality:
next => 2020-11-01T05:22:21.000Z
nextWithDTSTART => 2020-04-01T10:30:00.000Z
When the rule doesn't have a DTSTART, a date in the past passed to after is ignored, and the current date is used.
I believe the result of both calls should be the same.
Reporting an issue
Thank you for taking an interest in
rrule
! Please include the following in your report:rrule
you are using Using rrule 2.6.6$ date
from the command line of the machine showing the bug) Asia/SingaporeWhen calling
after
with a date in the past, on a rrule without DTSTART, the result is not the expected:In this example, from my understanding the value of
next
andnextWithDTSTART
should be the same.But in reality:
When the rule doesn't have a DTSTART, a date in the past passed to
after
is ignored, and the current date is used. I believe the result of both calls should be the same.