awesomemotive / sugarcalendar-icalendar-rrule-sequencer

Parse an iCalendar RRULE into an array of dtstart, dtend, sequence, and recurrence-id attributes
GNU General Public License v3.0
1 stars 3 forks source link

Sequence ID values may be incorrect #2

Open JJJ opened 2 years ago

JJJ commented 2 years ago

When using sequencing via 'sequence' => true the ID for the sequence may not correct.

This happens in the (somewhat common) circumstance where an Event is being sequenced using before and after boundaries that are not the same as the Event dtstart or dtend.

Rather than base the sequence ID off of the dtstart, it is based off of the after, which results in repeatedly incorrect values across various views, months, etc...


I've identified the cause as it using current_count (which is derived from the after boundary) rather than the beginning of the sequence of the do {} while loop itself.

https://github.com/awesomemotive/sugarcalendar-icalendar-rrule-sequencer/blob/2ae30da64e559d16f8a3904cd022991fa5d99125/ical-rrule-sequencer.php#L1304-L1307