Closed kkoyung closed 9 months ago
Yes, this is probably right, I'll take a closer look. There's a bit of an issue with ics from different sources...
I think I fixed it in e3787ed3cdb8ce558f4bc1b5dcd157f79d808a1d Please try the main branch
The all day events are shown at correct dates now. It works perfectly.
Issue
Calcure displays all-day ICS event with one extra day.
Here is an example of ICS event.
From Section 3.6.1 of RFC 5545 (the spec of iCalendar), the start date
DTSTART
is inclusive, and the end dateDTEND
is non-inclusive. So, this example is a two days event (Dec 3 and 4). However, calcure shows it as a three days event (Dec 3, 4 and 5). One more extra day.Inspection
I think the problem comes from calculating the repetition in
loaders.py
. https://github.com/anufrievroman/calcure/blob/f363ccc68abbe1921ccf47e15941b93bed62defe/calcure/loaders.py#L430 Since the end data is non-inclusive, we don't need to add 1 to the difference in days.