bugfixing

This commit is contained in:
MuslemRahimi 2024-12-30 13:41:07 +01:00
parent e6400759c2
commit 93a4b443a1

View File

@ -22,7 +22,7 @@
minute: "numeric", minute: "numeric",
second: "numeric", second: "numeric",
timeZone: "America/New_York", timeZone: "America/New_York",
hour12: false, hour12: true, // Enable AM/PM format
}; };
// Format date for New York timezone // Format date for New York timezone
@ -35,11 +35,10 @@
const minute = parts const minute = parts
.find((p) => p.type === "minute") .find((p) => p.type === "minute")
.value.padStart(2, "0"); .value.padStart(2, "0");
const second = parts
.find((p) => p.type === "second")
.value.padStart(2, "0");
return `${day}/${year} ${hour}:${minute}:${second}`; const ampm = parts.find((p) => p.type === "dayPeriod").value; // AM/PM
return `${day}/${year} ${hour}:${minute} ${ampm}`;
} }
let sortOrders = { let sortOrders = {