I have JavaScript code which displays the current date in en-CA format.
date = new Date();
console.log(date.toLocaleDateString('en-CA'));
Previously the en-CA locale formatted dates as yyyy-MM-dd (2023-02-24). However, as of today these dates suddenly started displaying as M/d/yyyy (2/24/2023) without me making any changes to the code. I've reproduced this issue across two different computers running Chrome, Firefox, and Edge on Windows 10 & 11.
Why did the en-CA locale start formatting dates as M/d/yyyy instead of yyyy-MM-dd?