Compare commits

..

1 Commits

Author SHA1 Message Date
d530f6abdf 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
2026-04-11 23:19:10 -04:00
2 changed files with 2 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@ztimson/utils", "name": "@ztimson/utils",
"version": "0.29.2", "version": "0.29.3",
"description": "Utility library", "description": "Utility library",
"author": "Zak Timson", "author": "Zak Timson",
"license": "MIT", "license": "MIT",

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 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); const hourValue = parseInt(partsMap.hour);
get = (fn: 'FullYear' | 'Month' | 'Date' | 'Day' | 'Hours' | 'Minutes' | 'Seconds' | 'Milliseconds'): number => { get = (fn: 'FullYear' | 'Month' | 'Date' | 'Day' | 'Hours' | 'Minutes' | 'Seconds' | 'Milliseconds'): number => {