Skip to content

Commit

Permalink
thanskgivingday: Fix for 2024
Browse files Browse the repository at this point in the history
Hack since we don't actually have calendar functions in Starlark.
  • Loading branch information
rohansingh authored Nov 5, 2024
1 parent f0b9ebc commit 3c1027f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/thanksgivingday/thanksgiving_day.star
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def main(config):
thanksgiving_year = now.year

thanksgiving_day = math.ceil(28 - (5 + now.year + now.year / 4 - now.year / 100 + now.year / 400) % 7)
if thanksgiving_year == 2024:
thanksgiving_day = 28

if 11 == now.month:
if 0 > thanksgiving_day - now.day:
Expand Down

0 comments on commit 3c1027f

Please sign in to comment.