Earlier quoted context omitted.
Format the date on the frontend using date.toLocaleDateString() and let the browsers locale do the work for you (assuming you’re in JS and on the web).
Short of stepping through the JavaScript line-by-line, how do you tell the difference between these two dates? 3/11/2021 3/11/2021 The difference is one was formatted incorrectly, and the other was formatted correctly. One is 2021-03-11, the other is 2021-11-03. Even having been told that there's a difference, you cannot know which is which. Even if you think you know because you found an unambigious date like 31/11/…
ISO 8601: a better date format
201–210 of 437 posts
Re: ISO 8601: a better date format
#202 ls -l --time-style=full-iso
git log --date=iso
date --iso-8601=s # or date --rfc-3339=s
export TIME_STYLE='long-iso'Re: ISO 8601: a better date format
#203The 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 is one of my favourites (the "8601", the "Security", and the "Bobby Tables")
Re: ISO 8601: a better date format
#204The 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…
Re: ISO 8601: a better date format
#205Re: ISO 8601: a better date format
#206Earlier quoted context omitted.
My wife recently bought by mistake a keyboard whose layout I couldn't figure out. It took me a full 5 minutes to even get to the correct place where I could configure keyboard layouts under Windows 10 settings. Then I had to choose the keyboard layout I wanted to add. This was a list in a dropdown with hundreds of options without an image of what each layout looks like so I could not check which option matched the ke…
I like the method that Mac OS uses to detect the layout of a newly connected keyboard. It brings up a dialog asking the user to press specific keys (something like "type the | character") until there is only one possible layout that would generate the observed keycodes for the characters in question.
Re: ISO 8601: a better date format
#207Earlier quoted context omitted.
I think because it would defeat the portability of a timestamp because Asia/Tokyo isn't constant and you cannot lookup the offset without relying on external database that takes in ("2021-02-26 18:38:00", "Asia/Tokyo") as a parameter. Offset in zoneinfo changes depending on day of a year, and sometimes even hour of a day, and the database of timezone is constantly updated (latest zoneinfo is version 2021a). So while…
I knew about TAI but TAI64 is new to me, thanks. About the TZ database, don't all date lookups require accessing it? If I schedule a meeting in Asia/Tokyo now, and the database tells me it's +09:00, I still have to remember it's Asia/Tokyo because the offset may change 5 minutes before the meeting. Analyzing the timestamp requires a TZ database, but that's calendars for you; the encoding is not going to change this.…
Re: ISO 8601: a better date format
#208Earlier quoted context omitted.
Sure you can tell. You just hire an investigator to find out who wrote the memo, and find where in the world they grew up, in what culture. If the answer comes back very US, then it's middle endian US format. Else it's DMY. Note that the article is wrong to just say "dd.mm.yy" is used in "Europe". Some countries use yyyy-mm-dd and others dd/mm/yy. The US format is the only one that's retarded, though.
> The US format is the only one that's retarded, though. I wonder how it started? A skim of the internets hasn’t enlightened me.
But people are very good at verbally saying different than is written.
Re: ISO 8601: a better date format
#209Earlier quoted context omitted.
I think because it would defeat the portability of a timestamp because Asia/Tokyo isn't constant and you cannot lookup the offset without relying on external database that takes in ("2021-02-26 18:38:00", "Asia/Tokyo") as a parameter. Offset in zoneinfo changes depending on day of a year, and sometimes even hour of a day, and the database of timezone is constantly updated (latest zoneinfo is version 2021a). So while…
I knew about TAI but TAI64 is new to me, thanks. About the TZ database, don't all date lookups require accessing it? If I schedule a meeting in Asia/Tokyo now, and the database tells me it's +09:00, I still have to remember it's Asia/Tokyo because the offset may change 5 minutes before the meeting. Analyzing the timestamp requires a TZ database, but that's calendars for you; the encoding is not going to change this.…
In this case, timezone is external to this format and the timestamp can be calculate back to UTC without relying on zoneinfo (which is very useful for exchange). Any further conversation would be external to this format. e.g., in case of calendar, it's probably more useful to have datetime in local timezone rather than of the other party's timezone so the tuple would be (utc_time, local_tz) rather than (other_localtime, other_tz, local_tz).
Re: ISO 8601: a better date format
#210Earlier quoted context omitted.
How about french? 99 is four twenties nineteen, 79 is sixty nineteen. Languages are fun and fascinating.
I think your response to these language quirks can vary depending on your familiarity with the language: - to an outsider, learning that a concept exists: “that is an interesting thing” - to a beginner, trying to construct the right form or to detect it in quickly spoken speech: “this is annoying and I hate it” - to an intermediate speaker and beyond: “eh it’s maybe weird but whatever” I used to hate noun declension…
You may not be able to correct it from the Information available but you’ll know something went wrong.