Fix event date end when not set on all-day events
As explained in RFC 5545, when DTEND is not set, it’s:
- DTSTART when DTSTART is a datetime,
- (DTSTART + 1 day) when DTSTART is a date.
Fixing this function fixes 2 bugs with all-day events with no DTEND:
- on the week view, these events were not drawn (with an error printed in the logs),
- on the month view, events on the first day of the month were also displayed on the first day of the previous month.
I didn’t find open issues with these exact problems, but it may at least be related to #508 (closed), #545 (closed), #500 (closed).
(Sorry if my code is not perfect, I’ve tried my best to follow guidelines but I don’t write C often