Live data from Hacker News

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

brandondong.github.io

1–10 of 167 posts

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

#7
Hang 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?

#8
post #6

How did they manage to build the entire modern Web on a language without a standard library?

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.

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

#9
post #6

How did they manage to build the entire modern Web on a language without a standard library?

There's even worse language language for this. It's absolutely essential for an modern e-commerce, but has no official standard or spec, many thousands of libraries but they're mostly poorly maintained and geoblocked. The language itself is just a hodge podge of other languages that were popular in the past, and as a result it's worse than Perl for having too many ways to do any single thing. The major dialects may be theoretically compatible, but in practice there's usually friction when you try to mix them.

[Ok that's enough, ed.]

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

#10
post #8
post #6

How did they manage to build the entire modern Web on a language without a standard library?

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.

Post reply on HN