rrule icon indicating copy to clipboard operation
rrule copied to clipboard

Bugfix - Apply dtstart option when forceset: true

Open jutaz opened this issue 4 years ago • 1 comments

This PR fixes a bug which happens when using rrulestr in a similar way to this:

rrulestr('RRULE:FREQ=WEEKLY', {
  forceset: true,
  dtstart: new Date()
});

In the past (talking ~2.2.0 ish) this would apply dtstart and the created rules would have the dtstart. That's no longer the behavior. Having an explicit dtstart which could even override the DTSTART: specified in the rule was quite convenient, and this PR brings it back.

What's interesting is that this is already the behavior when one doesn't specify forceset: true.


Thanks for contributing to rrule!

To submit a pull request, please verify that you have done the following:

  • [x] Merged in or rebased on the latest master commit
  • [x] Linked to an existing bug or issue describing the bug or feature you're addressing
  • [x] Written one or more tests showing that your change works as advertised

jutaz avatar Oct 23 '20 13:10 jutaz

@jakubroztocil please merge this PR. This bug is blocking my ability to use the library

jbuck94 avatar Mar 17 '23 19:03 jbuck94