mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-24 06:58:10 -05:00
Fix org calendar every page starting Monday
This commit is contained in:
parent
413d1394a2
commit
423cd86d78
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user