From 423cd86d780ffc124f7fb1faf3b550b6f2c215ea Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 28 Jul 2024 20:26:33 +0300 Subject: [PATCH] Fix org calendar every page starting Monday --- app/utils/dates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/dates.ts b/app/utils/dates.ts index 479938a7f4..4e88e0f057 100644 --- a/app/utils/dates.ts +++ b/app/utils/dates.ts @@ -142,7 +142,7 @@ export function dateToYYYYMMDD(date: Date) { // same as datesOfMonth but contains null at the start to start with monday export function nullPaddedDatesOfMonth({ month, year }: MonthYear) { const dates = datesOfMonth({ month, year }); - const firstDay = dates[0].getUTCDate(); + const firstDay = dates[0].getUTCDay(); const nulls = Array.from( { length: firstDay === 0 ? 6 : firstDay - 1 }, () => null,