ISO 8601: a better date format
kirby.kevinson.org
ISO 8601: a better date format
1–10 of 437 posts
Re: ISO 8601: a better date format
#2Re: ISO 8601: a better date format
#3Re: ISO 8601: a better date format
#4The real purpose of endianness which is missed here is the ability to sort. Sorting a list of iso8601 dates alphabetically means sorting them chronologically too.
Re: ISO 8601: a better date format
#5The real purpose of endianness which is missed here is the ability to sort. Sorting a list of iso8601 dates alphabetically means sorting them chronologically too.
Re: ISO 8601: a better date format
#6It'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 is correct. That is the one single case where there is no confusion. This works as expected for just 4% of the world population, but it is those 4% of the world that get to decide the date format.
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.
/rant over
Re: ISO 8601: a better date format
#7Shameless plug: I built a python library to do exactly that https://pypi.org/project/yyyy-mm-dd/
Re: ISO 8601: a better date format
#8The real purpose of endianness which is missed here is the ability to sort. Sorting a list of iso8601 dates alphabetically means sorting them chronologically too.
> This not only makes all of the dates look equally nice, but also, coupled with other quirks of this format, allows the files with the date in the name to be sorted just by the filename.
My issue is with:
> Simplified, the core date format looks like this: yyyy-mm-dd hh:mm:ss
Here are the examples at https://en.wikipedia.org/wiki/ISO_8601
2021-02-26T06:22:59+00:00
2021-02-26T06:22:59Z
20210226T062259Z
Note the "T" instead of a space between the date and time? That's what the spec says: https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_tim... . "Separating date and time parts with other characters such as space is not allowed in ISO 8601, but allowed in its profile RFC 3339."Note the optional use of "-" and ":"? That's "basic" vs. "extended" formats.
Plus the optional timezone specifier (if not present, assume it's the same timezone).
There's also optional support for microseconds.
Re: ISO 8601: a better date format
#9Given 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.
Re: ISO 8601: a better date format
#10The real purpose of endianness which is missed here is the ability to sort. Sorting a list of iso8601 dates alphabetically means sorting them chronologically too.
It's there: > This not only makes all of the dates look equally nice, but also, coupled with other quirks of this format, allows the files with the date in the name to be sorted just by the filename. My issue is with: > Simplified, the core date format looks like this: yyyy-mm-dd hh:mm:ss Here are the examples at https://en.wikipedia.org/wiki/ISO_8601 2021-02-26T06:22:59+00:00 2021-02-26T06:22:59Z 20210226T062259Z No…