Why Are 2025/05/28 and 2025-05-28 Different Days in JavaScript?

In JavaScript, 2025/05/28 and 2025-05-28 yield different results due to parsing behavior. The former is interpreted as local time, while the latter is treated as UTC, causing discrepancies in the displayed date. This inconsistency arises from varying interpretations of date formats across browsers, influenced by standards updates, leading to conflicting behaviors over time. Upcoming JavaScript Temporal APIs aim to resolve such ambiguity by allowing explicit handling of date-only strings without timezone confusion.

https://brandondong.github.io/blog/javascript_dates/