Skip to content

Commit

Permalink
chore(fng): Altered dates and implemented zero padding logic (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianDianos authored Jan 5, 2025
1 parent 71e4133 commit 3fb1ce8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/commands/faq.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ async def food(self, interaction: Interaction):
tz = pytz.timezone("Australia/Adelaide")
# Manually inputting dates
date_stack = [
tz.localize(dt.datetime(2024, 10, 25, 17)),
tz.localize(dt.datetime(2024, 8, 30, 17)),
tz.localize(dt.datetime(2024, 7, 26, 17)),
tz.localize(dt.datetime(2024, 5, 31, 17)),
tz.localize(dt.datetime(2024, 4, 26, 17)),
tz.localize(dt.datetime(2024, 3, 29, 17)),
tz.localize(dt.datetime(2025, 10, 31, 17)),
tz.localize(dt.datetime(2025, 9, 19, 17)),
tz.localize(dt.datetime(2025, 8, 29, 17)),
tz.localize(dt.datetime(2025, 6, 20, 17)),
tz.localize(dt.datetime(2025, 5, 30, 17)),
tz.localize(dt.datetime(2025, 4, 4, 17)),
]

# Checking if the tail date has already passed
Expand Down Expand Up @@ -111,6 +111,9 @@ async def food(self, interaction: Interaction):

# Determining whether date needs a st, nd, rd or rth
date_num = date_stack[-1].strftime("%d")
# Removing zero padding if present
if date_num[0] == "0":
date_num = date_num[1:]
date_day = date_stack[-1].strftime("%B")
time_difference_days = time_difference.days
if curr_date.time().hour >= 17:
Expand Down
Binary file added src/db/admin_settings.db
Binary file not shown.
Binary file added src/db/skull.sqlite
Binary file not shown.

0 comments on commit 3fb1ce8

Please sign in to comment.