dmfs / lib-recur

A recurrence processor for Java
Apache License 2.0
198 stars 47 forks source link

FastForwarded still includes earlier RDATEs if fastForwardTo ≤ DTSTART #125

Closed janusvm closed 10 months ago

janusvm commented 10 months ago

I believe there's a bug in the way FastForwarded handles RDATES. It could potentially be related to #67, but I'm not sure.

Steps to reproduce

  1. Define FastForwarded Composite of
    • InstanceList of RDATEs, e.g. [2023-07-15, 2023-08-15]
    • RuleInstances of some RecurrenceRule, e.g. FREQ=MONTHLY;BYMONTHDAY=10;
    • fastForwardTo after an RDATE, e.g. 2023-08-01
  2. Define RecurrenceSet of the above with first after or equal to fastForwardTo, e.g. 2023-08-01 or 2023-08-02

Observed behaviour

The RecurrenceSet iteration starts with the RDATE prior to fastForwardTo, then occurrences from the fast forwarded rule instances, i.e.

Expected behaviour

The RecurrenceSet fast forwards past the RDATEs, and iteration starts with the first occurrence after fastForwardTo, i.e.

If instead fastForwardTo is strictly after first by one day, the expected behaviour is observed.

Notes

dmfs commented 10 months ago

Thanks for the detailed report. Looks indeed like a bug. I'll take care of that.

dmfs commented 10 months ago

fixed in 1.15.1