Skip to content

Commit

Permalink
Remove seconds_*
Browse files Browse the repository at this point in the history
  • Loading branch information
davepeck committed Apr 2, 2024
1 parent a734400 commit 99a5b85
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions server/vb/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,16 +138,6 @@ def is_past(self, when: datetime.datetime | None = None) -> bool:
when = when or django_now()
return self.end_at <= when

def seconds_until_start(self, when: datetime.datetime | None = None) -> float:
"""Return the number of seconds until the contest starts."""
when = when or django_now()
return (self.start_at - when).total_seconds()

def seconds_until_end(self, when: datetime.datetime | None = None) -> float:
"""Return the number of seconds until the contest ends."""
when = when or django_now()
return (self.end_at - when).total_seconds()

def description(self):
"""Render the contest template."""
context = {"school": self.school, "contest": self}
Expand Down

0 comments on commit 99a5b85

Please sign in to comment.