icalevents icon indicating copy to clipboard operation
icalevents copied to clipboard

Using dateutil.rrule

Open dlichtistw opened this issue 6 years ago • 1 comments

Is there a reason not to use dateutil.rrule for handling recurring events? It claims to implement a superset of iCal rrules, handles exdates, exrules ~~and DST transitions~~ (apparently, it doesn't). If there is no reason against it, I would propose to rewrite the whole recurring events logic.

dlichtistw avatar Sep 18 '18 05:09 dlichtistw

What the new code does:

  • Extract the calendar's first TZID. If any is present, it is used (instead of UTC) for datetime normalization.
  • Use dateutil.rrule for recursion rule parsing and expansion, handling DST transitions according to the calendars TZID (or UTC).
  • Observe EXDATEs via rruleset objects.

What is yet to be implemented:

  1. Observe RDATEs and EXRULEs.
  2. Use an event's specified timezone (if any, instead of the calendar's timezone) for rrule expansion.

I would be willing to work on those two points. But for 1, real world use cases would be helpful. And for 2, I would like to get some thoughts on how event specific timezones should interact with datetime normalization by the icalparser.normalize function. Probably #19 should also be considered here.

dlichtistw avatar Sep 29 '18 19:09 dlichtistw

rrule is now used - thanks for the issue :-)

eigenmannmartin avatar Sep 09 '24 13:09 eigenmannmartin