I have an issue with this date but not quite sure why this is happening.
const a = something.toLocaleString(); // 2024/04/04, 3:17:07 p.m.
const b = a.replace(/-/g,"/"); // 2024/04/04, 3:17:07 p.m.
const x = new Date(b); // Invalid Date
Why does this work in Chrome but not in Edge or Firefox