let ts = new Date().toLocaleString("en-US", {
timeZone: "America/New_York", hour12: false,
})
const formatter = new Intl.DateTimeFormat('en-US', {
timeZone: 'America/New_York',
weekday: 'long',
hour12: false,
hour: 'numeric',
minute: 'numeric'
});
const parts = formatter.formatToParts(new Date()).reduce((acc, entry) => ({
...acc,
[entry.type]: entry.value
}), {});
console.log(parts); // {weekday: 'Thursday', literal: ':', hour: '12', minute: '19'}