OzzyCzech / icalparser

Simple ical parser for PHP
https://ozana.cz
BSD 3-Clause "New" or "Revised" License
59 stars 22 forks source link

Recurrences only works for 3 years #28

Closed ghost closed 4 years ago

ghost commented 6 years ago

Unlimited recurring events only works for 3 years because it is limited in class IcalParser in function parseRecurrences $end = clone($event['DTSTART']); $end->add(new \DateInterval('P3Y')); // + 3 years

After 3 years the recurring event is not working anymore.

I am working on a solution for this issue, but I am not finished, yet. Are there any more ideas which could help me?

drewpc commented 6 years ago

I added that constraint in order to protect the system and not generate an infinite number of recurring events. Do you have a better solution to propose?

OzzyCzech commented 6 years ago

Maybe that can be configurable

ghost commented 6 years ago

I have changed the code and created a functions findStart() which calculates the recurrences depending on the current date for 3 years in future. Could you please check it?

image

I use this fix since a few months and it works for me.

petrk94 commented 6 years ago

@OzzyCzech can this fix be merged?