[flagged]
Why are 2025/05/28 and 2025-05-28 different days in JavaScript?
11–20 of 167 posts
Re: Why are 2025/05/28 and 2025-05-28 different days in JavaScript?
#12Hang on, slashes and year-month-day? https://en.wikipedia.org/wiki/ISO_8601 Handed down by the ISO, The Great Compromise allows YYYY-MM-DD (or YYYYMMDD if you're in a hurry) but the version with slashes I'd find ambiguous and upsetting, especially early in the month. The standard is good, and you can get it from `date -I`. Hell mend anyone who messes with the delimiters or writes the year in octal or any other heresy…
Re: Why are 2025/05/28 and 2025-05-28 different days in JavaScript?
#13Re: Why are 2025/05/28 and 2025-05-28 different days in JavaScript?
#14Earlier quoted context omitted.
The world where JavaScript has a robust standard library is one where there is only one browser vendor who gets to call all the shots regarding what the web looks like. That is not a better world.
> That is not a better world. Not a better world, just the current world.
Re: Why are 2025/05/28 and 2025-05-28 different days in JavaScript?
#15Re: Why are 2025/05/28 and 2025-05-28 different days in JavaScript?
#16Re: Why are 2025/05/28 and 2025-05-28 different days in JavaScript?
#17Re: Why are 2025/05/28 and 2025-05-28 different days in JavaScript?
#18Hang on, slashes and year-month-day? https://en.wikipedia.org/wiki/ISO_8601 Handed down by the ISO, The Great Compromise allows YYYY-MM-DD (or YYYYMMDD if you're in a hurry) but the version with slashes I'd find ambiguous and upsetting, especially early in the month. The standard is good, and you can get it from `date -I`. Hell mend anyone who messes with the delimiters or writes the year in octal or any other heresy…
Pro tip: never ever use anything but ISO dates in UTC tz unless you're displaying it for a user in a UI.
Re: Why are 2025/05/28 and 2025-05-28 different days in JavaScript?
#19Hang on, slashes and year-month-day? https://en.wikipedia.org/wiki/ISO_8601 Handed down by the ISO, The Great Compromise allows YYYY-MM-DD (or YYYYMMDD if you're in a hurry) but the version with slashes I'd find ambiguous and upsetting, especially early in the month. The standard is good, and you can get it from `date -I`. Hell mend anyone who messes with the delimiters or writes the year in octal or any other heresy…
Pro tip: never ever use anything but ISO dates in UTC tz unless you're displaying it for a user in a UI.
Conversion to UTC is not injective e.g. when clocks change or politics happen
Re: Why are 2025/05/28 and 2025-05-28 different days in JavaScript?
#20How did they manage to build the entire modern Web on a language without a standard library?