From 33a2e9b2fe75efcf2fbd683b094fea67471c900c Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 9 Apr 2019 10:48:34 +0200 Subject: [PATCH] Added duration manipulation for multi-day events --- Calendar/DayViewPanel.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Calendar/DayViewPanel.py b/Calendar/DayViewPanel.py index 480f334..3a5b747 100644 --- a/Calendar/DayViewPanel.py +++ b/Calendar/DayViewPanel.py @@ -58,11 +58,13 @@ class DayViewPanel (PanelDesign): today = date.today() tzinfo = event.end_datetime.tzinfo event.end_datetime = datetime(today.year, today.month, today.day, 0, 0, 0, 0, tzinfo) + timedelta(1) + event.duration = timedelta(0, 0, 0, 0, event.begin_datetime.minute, event.begin_datetime.hour) timed_ev.append(event) elif self.__is_today__(event.end_datetime): today = date.today() tzinfo = event.begin_datetime.tzinfo event.begin_datetime = datetime(today.year, today.month, today.day, 0, 0, 0, 0, tzinfo) + event.duration = timedelta(0, 0, 0, 0, event.end_datetime.minute, event.end_datetime.hour) timed_ev.append(event) else: allday_ev.append(event)