Closed siderai closed 6 months ago
The native way of doing the convertion is to use event.icalendar_component
, so in this case it would be something like event.icalendar_component.add('EXDATE', my_exdate)
(not tested).
I'm trying to avoid "silly convertions" in the library both for performance reasons and because it may change the data itself, but to be honest I've lost the overview of how often it's done in the library. I should do some research into this at some point. The way to do it without "silly convertions" goes something like this: event.data = event.data.replace("END:VEVENT", f"EXDATE:{my_exdate}\nEND:VEVENT")
. Again, not tested at all.
I think convertion is probably a more robust solution than the replace solution.
I have a trouble adding EXDATE field to recurring events. Currently, I am trying to convert
caldav.Event
toics.Event
, change the data, convent back tocaldav.Event
and then save. Not to mention that this solution is ugly, it's also unstable. I am looking for more native and convenient way. Any advice?