Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions datein/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ async def today(self, interaction: discord.Interaction, button: discord.ui.Butto
"You cannot control this calendar.", ephemeral=True
)

today = date.today()
self.year = today.year
self.month = today.month
self.day = None
today_date = date.today()
self.year = today_date.year
self.month = today_date.month
if self.day is not None:
self.day = today_date.day

await self.update_calendar(interaction)

Expand Down Expand Up @@ -194,7 +195,7 @@ async def generate_calendar_image(self, interaction, scope, month, year, day):
if day:
draw.text(
(width // 2, 80 * scale),
f"{calendar.day_name[date(year, month, day).weekday()]}, {month}.{day}.{year}",
f"{calendar.day_name[date(year, month, day).weekday()]}, {day:02d}.{month:02d}.{year}",
fill=text_color,
font=font_title,
anchor="mm"
Expand Down
Loading