Skip to content

Commit

Permalink
Fix org calendar every page starting Monday
Browse files Browse the repository at this point in the history
  • Loading branch information
Sendouc committed Jul 28, 2024
1 parent 413d139 commit 423cd86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/utils/dates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 423cd86

Please sign in to comment.