Skip to content

Commit

Permalink
Update thanksgiving_day.star
Browse files Browse the repository at this point in the history
  • Loading branch information
savdagod authored Nov 9, 2024
1 parent 4dd209b commit 1f2e311
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/thanksgivingday/thanksgiving_day.star
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ def main(config):
thanksgiving_day = time.time(year = now.year,month = 11,day = day,location = timezone)
diff = thanksgiving_day - now
diff_days = abs(int(diff.hours / 24))
days_til_thanksgiving = diff_days + 1
if now < thanksgiving_day:
days_til_thanksgiving = diff_days + 1
else:
days_til_thanksgiving = 365 - (diff_days + 1)

return render.Root(
delay = 1000,
Expand Down

0 comments on commit 1f2e311

Please sign in to comment.