Skip to content

Commit

Permalink
Resolve another datetime issuefor birthday
Browse files Browse the repository at this point in the history
  • Loading branch information
nattadasu committed Dec 1, 2024
1 parent c69cb29 commit 43db682
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions extensions/birthday.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,8 +728,7 @@ async def birthday_list(self, ctx: ipy.SlashContext):
day_from = i + 1
day_limit = i + 7
# use last day of the month if the day limit exceeds
mnend = datetime(today.year, today.month +
1, 1) - timedelta(days=1)
mnend = today.replace(day=1, month=today.month % 12 + 1) - timedelta(days=1)
if day_limit > mnend.day:
day_limit = mnend.day
index = f"{day_from} to {day_limit}" if day_from < day_limit else f"{day_from}"
Expand Down

0 comments on commit 43db682

Please # to comment.