ical.net icon indicating copy to clipboard operation
ical.net copied to clipboard

FIX BUG: Stop adding referenceDate to results when at least one RRule is defined

Open ITESMEDIA opened this issue 5 years ago • 1 comments

We changed a few things based on the following premises:

  • The DTSTART of a recurring calendar component must not be included the recurrence set if it does not match the RRule
  • Calling RecurrenceUtil.GetOccurrences with the same periodStart and periodEnd must include events that starts at that specific moment
  • Calling RecurrenceUtil.GetOccurrences with the same periodStart and periodEnd must not include events that ends at that specific moment

Not adding referenceDate to the results set at the start allows the rest of the logic to run normally and only add that date if it's part of the reccurenceRule. It will still be added to the results if the element has no recurrenceRule defined.

Theses modifications make issue #432 more predictable by returning the same results on the first day and subsequent days which are in the RRule. A slightly modified version of the code provided from that issue has been added to the unit tests.

ITESMEDIA avatar Mar 19 '19 21:03 ITESMEDIA

Please approve this change. I am doing some strange (if date != today) stuff to get around this now. Thank you for your contribution.

BrettBurbidge avatar Apr 22 '21 21:04 BrettBurbidge