Cross timezone day of week fix
All checks were successful
Build / Build NPM Project (push) Successful in 53s
Build / Tag Version (push) Successful in 11s
Build / Publish Docs (push) Successful in 40s

This commit is contained in:
2026-04-11 23:19:10 -04:00
parent cbee6a4509
commit d530f6abdf
2 changed files with 2 additions and 2 deletions

View File

@@ -155,7 +155,7 @@ export function formatDate(format: string = 'YYYY-MM-DD H:mm', date: Date | numb
});
const monthValue = parseInt(partsMap.month) - 1;
const dayOfWeekValue = new Date(`${partsMap.year}-${partsMap.month}-${partsMap.day}`).getDay();
const dayOfWeekValue = new Date(Date.UTC(parseInt(partsMap.year), parseInt(partsMap.month) - 1, parseInt(partsMap.day))).getUTCDay();
const hourValue = parseInt(partsMap.hour);
get = (fn: 'FullYear' | 'Month' | 'Date' | 'Day' | 'Hours' | 'Minutes' | 'Seconds' | 'Milliseconds'): number => {