Skip to content

Commit

Permalink
add remaining_time property
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-zaidali committed Oct 1, 2023
1 parent a880ba4 commit 1be1c0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions timer/models.py
Expand Up @@ -126,6 +126,10 @@ def jump_url(self) -> str:
def remaining_seconds(self):
return self.ends_at - datetime.now(timezone.utc)

@property
def remaining_time(self):
return self.remaining_seconds

@property
def ended(self):
return datetime.now(timezone.utc) > self.ends_at
Expand Down

0 comments on commit 1be1c0c

Please sign in to comment.