Live data from Hacker News

ISO 8601: a better date format

kirby.kevinson.org

71–80 of 437 posts

Re: ISO 8601: a better date format

#71

No one here is talking about practicality for non-software engineers which is probably 99.9% of the population. It might be fine for sorting and no one gives a shit about endianess. Common person would argue - why do they need to know the year first? Most people encounter dates in the same year, they already know we're in 2021 and it is not as important. Having to laboriously parse YYYY before getting to the most imp…

> I hate writing ISO 8601 dates, even though I know it is logical.

Nobody forces you to write ISO 8601 dates but if you want your dates to be easily parseable by humans, why would you write them all in numbers?

3 Nov 2020, 3rd November 2020, Nov 3rd 2020, even something like 2020 Nov 3 is uniquely parseable by humans. Even if the human doesn't know the language of the month, they can still find out what date it is from a Google search.

With 3/10/2020 you never know for sure what date it is.

> I personally prefer inches and feet, they are just human scale dimensions.

Meter, centimeters, and millimeters are human scale dimensions, too. Just because you didn't grow up with them doesn't make them non-human.

Re: ISO 8601: a better date format

#72

The real advantage is that Azure and AWS and every other US-centric cloud service insists on showing me that something happened on the 3/11/2021. It's a wild guess to figure out if that is the 11th of March or the 3rd of November. Unless there's also another date with a number higher than 12 in it, there is no way to tell. None. None whatsoever. For US staff with US regional settings, it's always obvious which date i…

I have taken to writing 11 March 2021 or similar whenever possible. But sure, 2021-03-11 is also fine, when trying to save something machine readable. The US conventions are indeed horrendous.

Another great thing about 2021-03-11 is that, even putting aside its technical advantages, it is (probably) intuitively understandable to any literate person even if they have never seen it before and, most importantly, it is almost immune from confusion because (hopefully) nobody is insane enough to expect YYYY-DD-MM. YYYY-MM-DD both satisfies the American intuitive expectation of month coming before day, and the Worldwide expectation of time units being displayed in a logical order.

Re: ISO 8601: a better date format

#73
Free versions of the actual specs:

https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0038_i...

https://www.loc.gov/standards/datetime/iso-tc154-wg5_n0039_i...

Or https://www.iso.org/obp/ui/#iso:std:iso:8601:-1:ed-1:v1:en

The ISO8601 yyyy-mm-dd format is fine and intuitive. What trips people up all the time is the ISO8601 yyyy-www-d format (year-week-weekday)[1]. People who know it well can appreciate the benefits. But it's deeply unintuitive to people who encounter it for the first time, that the year in yyyy-www-d sometimes differes from the year in the yyyy-mm-dd format. And a perpetual source of bugs when inexperienced devs use the wrong year specifier (https://news.ycombinator.com/item?id=18762988).

The biggest wart in the spec IMO is the (optional) T in 2021-02-26T09:24, which makes the datetime format much harder to read for humans.

[1] https://en.wikipedia.org/wiki/ISO_week_date

Re: ISO 8601: a better date format

#74
post #9

There's another aspect you may not know about: It's close to how it's done in chinese, which is 2021年3月17日. They use different separators (the chinese words for year, month and day), but it's close enough. Given that china is the country with the largest population it may not be a bad idea to use something a large number of people will easily understand.

Maybe we should also start speaking Chinese since it may not be a bad idea to use something a large number of people will easily understand. Edit: this is not sarcasm. It’s simple logic, unless there is something wrong with learning other languages.

Being able to speak popular languages is in fact often advantageous for the multi-linguist.

Re: ISO 8601: a better date format

#75

The real advantage is that Azure and AWS and every other US-centric cloud service insists on showing me that something happened on the 3/11/2021. It's a wild guess to figure out if that is the 11th of March or the 3rd of November. Unless there's also another date with a number higher than 12 in it, there is no way to tell. None. None whatsoever. For US staff with US regional settings, it's always obvious which date i…

I have taken to writing 11 March 2021 or similar whenever possible. But sure, 2021-03-11 is also fine, when trying to save something machine readable. The US conventions are indeed horrendous.

I also always write 11 मार्च 2021 or similar whenever possible. No problems so far.

Re: ISO 8601: a better date format

#76

No one here is talking about practicality for non-software engineers which is probably 99.9% of the population. It might be fine for sorting and no one gives a shit about endianess. Common person would argue - why do they need to know the year first? Most people encounter dates in the same year, they already know we're in 2021 and it is not as important. Having to laboriously parse YYYY before getting to the most imp…

> laboriously parse YYYY

Really? It's hard to parse the year??

What about when you come across a piece of paper written some time ago, is it not useful to know the year?

> most people convey to others that this box is 12x8x8 inches

"Most people" == nobody outside of the US.

> And no one uses decimeter (10 cm) for some reason which is actually nice since its the size of the index finger

I just measured my index finger. It is 8.45 cm.

Re: ISO 8601: a better date format

#77
post #17

The article is missing one of the best features of iso 8601: it‘s string form is naturally sortable. You don‘t need any specific logic for sorting, so e.g. your filesystem will automatically sort files correctly if you prefix them with a iso 8601 date.

Even though it mentions this in the context of filenames being sortable, I agree that this should have been a bullet point of its own.

Re: ISO 8601: a better date format

#78

I would absolutely not use this for IT purposes if I could avoid it. The simple reason is that I have been bitten by time zone shenanigans way too often. The same stands for databases always use timestamptz and not just timestamp. Every frontend framework has functionality to properly and reliably format dates for a given locale. As for filenames. It contains a space which is a pita for command line use.

Date and time are separated by "T" and timezone is specifiable but optional.

From wikipedia: "If a time zone designator is required, it follows the combined date and time. For example, "2007-04-05T14:30Z" or "2007-04-05T12:30−02:00"."

Re: ISO 8601: a better date format

#79
post #9

There's another aspect you may not know about: It's close to how it's done in chinese, which is 2021年3月17日. They use different separators (the chinese words for year, month and day), but it's close enough. Given that china is the country with the largest population it may not be a bad idea to use something a large number of people will easily understand.

Maybe we should also start speaking Chinese since it may not be a bad idea to use something a large number of people will easily understand. Edit: this is not sarcasm. It’s simple logic, unless there is something wrong with learning other languages.

Lots of people learn English because a large number of people speak it. Why should it not apply to Chinese or other often-used languages?

Re: ISO 8601: a better date format

#80
post #68

The real advantage is that Azure and AWS and every other US-centric cloud service insists on showing me that something happened on the 3/11/2021. It's a wild guess to figure out if that is the 11th of March or the 3rd of November. Unless there's also another date with a number higher than 12 in it, there is no way to tell. None. None whatsoever. For US staff with US regional settings, it's always obvious which date i…

> It's the most obnoxiously American attitude imaginable to ignore this issue because it doesn't affect them... only the other 96% of the planet. I’m not going to comment on the author, though I will acknowledge the abrasive, unhealthy attitude. Anyway, no. I don’t think there’s a clear “American” standard. Maybe there once was, but I’d just see a pile of numbers these days. It’s hostile to the consumer as it inheren…

It is American. In the UK, we'd write 11th March 2021. But I don't mind too much when it's non-ambiguous like this.
Post reply on HN