si un événement fini le matin tôt, il n'est pas indiqué dans le jour concerné

This commit is contained in:
Jean-Marie Favreau 2023-11-11 21:38:33 +01:00
parent 165c997838
commit 2b48a210ae

View File

@ -64,7 +64,15 @@ class CalendarDay:
def is_today(self):
return self.today
def is_event_finishing_early_in_this_day(self, event):
if event.end_day is None or event.end_time is None:
return False
if event.start_day == event.end_day:
return False
return event.end_day == self.date and event.end_time < time(4)
def add_event(self, event):
if not self.is_event_finishing_early_in_this_day(event):
self.events.append(event)
if event.category is None:
if not "" in self.events_by_category: