From 076e318434fcfe6cdd72278a42b0967373af0818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20=C3=85hall?= Date: Tue, 9 Sep 2025 23:46:11 +0200 Subject: [PATCH] Fixed weekday --- Library/Widgets/Calendar.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Library/Widgets/Calendar.md b/Library/Widgets/Calendar.md index b38e4cd..8dae9f3 100644 --- a/Library/Widgets/Calendar.md +++ b/Library/Widgets/Calendar.md @@ -35,11 +35,9 @@ function generate_calendar(calendarID, year, month) local first_day = tonumber(os.date("%w", os.time{year=year, month=month, day=1})) + 1 -- Adjust the first day based on the week start setting - if week_start_on_monday then - first_day = first_day - 1 - if first_day == 0 then - first_day = 7 - end + first_day = first_day - 1 + if first_day == 0 then + first_day = 7 end local html = [[