aboutsummaryrefslogtreecommitdiffstats
path: root/db.py
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2024-02-29 16:14:57 +0200
committerJan Tuomi <jan@jantuomi.fi>2024-12-21 19:43:13 +0200
commit3213fb576a0aec19527f44237fbcfe4b65af6f29 (patch)
treedb3ac7ce2c883335cd5bc6d07f51d1b906a79a7d /db.py
parente02adca954f7689745f69f33f9f5f80174848836 (diff)
Show end datetime if not the same date
Diffstat (limited to 'db.py')
-rw-r--r--db.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/db.py b/db.py
index 42680cb..f660d94 100644
--- a/db.py
+++ b/db.py
@@ -70,6 +70,9 @@ class Choice:
def end_datetime_notz(self):
return self.end_datetime.replace(tzinfo=None)
+ def ends_on_same_day(self):
+ return self.start_datetime.date() == self.end_datetime.date()
+
@dataclass
class Poll:
id: str