ical: Handle repeting day long events
This commit is contained in:
parent
8f227ff099
commit
671110d178
@ -77,8 +77,13 @@ class IcalModule:
|
|||||||
elif "SA" in rrule["BYDAY"]:
|
elif "SA" in rrule["BYDAY"]:
|
||||||
weekday = 5
|
weekday = 5
|
||||||
|
|
||||||
start = next_weekday(today, weekday).replace(hour=start.hour, minute=start.minute, second=start.second, microsecond=start.microsecond)
|
diff = end - start
|
||||||
end = next_weekday(today, weekday).replace(hour=end.hour, minute=end.minute, second=end.second, microsecond=end.microsecond)
|
|
||||||
|
if isinstance(start, datetime):
|
||||||
|
start = next_weekday(today, weekday).replace(hour=start.hour, minute=start.minute, second=start.second, microsecond=start.microsecond)
|
||||||
|
else:
|
||||||
|
start = next_weekday(todayd, weekday)
|
||||||
|
end = start + diff
|
||||||
|
|
||||||
component["DTSTART"] = vDDDTypes(start)
|
component["DTSTART"] = vDDDTypes(start)
|
||||||
component["DTEND"] = vDDDTypes(end)
|
component["DTEND"] = vDDDTypes(end)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user