yyyy-mm-dd is so nice you can just work with strings for your date stuff, converting to objects and back is tedious Shameless plug: I built a python library to do exactly that https://pypi.org/project/yyyy-mm-dd/
ISO 8601: a better date format
11–20 of 437 posts
Re: ISO 8601: a better date format
#12One point is also: if you manually write a date, the easiest to remember part (the year) comes first, then the month (which is usually also easily remembered) and then the thing that you can forget at times.
This feels better than the other way around.
Re: ISO 8601: a better date format
#13The 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
#14I teach my 9-yo daughter to write dates in ISO 8601 format whenever permissible, too. I tell her that all other formats that her school teaches her are just nonsense and wrong.
Re: ISO 8601: a better date format
#15The 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
#16The 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.
Until we hit year 10000, but yeah, that's still a looong time to go.
Re: ISO 8601: a better date format
#17Re: ISO 8601: a better date format
#18Earlier quoted context omitted.
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…
I omitted this detail on purpose to not distract the reader who doesn't know much about date formats.
> "Here there’s only one correct way to write a date,"
given that there are multiple correct ways, and the way shown wasn't actually ISO 8601 but RFC 3339?
Re: ISO 8601: a better date format
#19The 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…
Example: 20210226-00:01:25 this presents the data in a format I can easily visually parse and also easily search for useful things in log files with.
When parsing such a date I tend to throw out all of the characters, but the 'Zulu' or timezone at the end probably should be parsed in anything that isn't a trivial internal use.
Re: ISO 8601: a better date format
#20The 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…
I must say I just saw the dd.mm.yyyy used in Italy, but it seems that a few other countries also use it.
(And EU requires dd/mm/yyyy in "best before" dates.)
Besides this nitpicking, I agree with the author for several years already.