We have an iCal file generated from Google Calendar that we're parsing. It has multiple events that are recurring weekly on Mondays, Tuesdays, Wednesdays, and Thursdays. When the recurring event is parsed, the first week parses correctly. But for all subsequent weeks, Mondays are omitted.
I enabled debugging in the function that locates the next occurrence of an event and it looks like after the event on Wednesday, the EOP (end of period) value was being set to the following Monday but at midnight, so the event on Monday was out of the scope. When it continued in the loop, it began with Tuesday, so no Monday (other than the first Monday) was included in the list of recurrences.
The solution that we employed was this:
Changed line 367 in /opt/calendar/vendor/om/icalparser/src/Freq.php to read
return $this->findStartingPoint($offset, 1, false);
Original value was:
return $this->findStartingPoint($offset, 1);
I have no idea if that was the correct way to resolve it, or if this should be introduced as something permanent to the code base. But it's working for our specific situation.
We have an iCal file generated from Google Calendar that we're parsing. It has multiple events that are recurring weekly on Mondays, Tuesdays, Wednesdays, and Thursdays. When the recurring event is parsed, the first week parses correctly. But for all subsequent weeks, Mondays are omitted.
I enabled debugging in the function that locates the next occurrence of an event and it looks like after the event on Wednesday, the EOP (end of period) value was being set to the following Monday but at midnight, so the event on Monday was out of the scope. When it continued in the loop, it began with Tuesday, so no Monday (other than the first Monday) was included in the list of recurrences.
The solution that we employed was this:
Changed line 367 in /opt/calendar/vendor/om/icalparser/src/Freq.php to read return $this->findStartingPoint($offset, 1, false);
Original value was: return $this->findStartingPoint($offset, 1);
I have no idea if that was the correct way to resolve it, or if this should be introduced as something permanent to the code base. But it's working for our specific situation.