Why are 2025/05/28 and 2025-05-28 different days in JavaScript?

62 points by runxiyu


jdheyburn

The last quip was a TIL for me. I had a play around in dev tools and looks like whatever the last appearing month “wins” the parse.

adamshaylor

This is a good reason to stick to ISO-8601 when producing and consuming date strings in a JavaScript context, and also to use a timezone designator unless you literally mean whatever the local time is wherever the user happens to be.