It’s not about saying it. It has to do with ordering it by size of time unit. Like I don’t write the time as 43:12:19 to denote 43 minutes and 19 seconds past midday do I.
I’m not sure I would agree with that. ISO-8601 is ambiguous, and very difficult to parse. For example, here are a couple valid ISO-8601 strings. Could you let me know what they mean?
Taken from here. My favorite is the last one (20). If someone just wrote 20 and told you to parse it using ISO-8601, what would you get? Hour? It could even be century (ie. 2023%100)!!
So I would argue that ISO-8601 is just a wee bit too flexible. Personally, I like RFC 3339 just a bit more…
Edit: that said, I would definitely agree that something along the lines of 2021-07-27T14:20:32Z is better than any regularly accepted alternative, and I pretty much format my dates that way all the time.
Not necessarily. Size of time unit doesn’t explicitly mean largest to smallest. For human comprehension day first makes sense because that’s the most significant piece of data usually. Likewise for time of day the hour is the most significant piece of data.
Though for computer comprehension, absolutely yyyy/mm/dd is best hands down.
It’s not about saying it. It has to do with ordering it by size of time unit. Like I don’t write the time as 43:12:19 to denote 43 minutes and 19 seconds past midday do I.
If it’s about size of time unit surely it should be 2023/11/20?
ISO8601 is the best format and the international standard to denote date and time.
2023-11-21T00:34:2
I’m not sure I would agree with that. ISO-8601 is ambiguous, and very difficult to parse. For example, here are a couple valid ISO-8601 strings. Could you let me know what they mean?
P1DT1H R10/2021-208/P1Y T22.3+0800 22,3 2021-W30-2 2021-W30-2T22+08 P1Y 20
Taken from here. My favorite is the last one (
20
). If someone just wrote20
and told you to parse it using ISO-8601, what would you get? Hour? It could even be century (ie.2023%100
)!!So I would argue that ISO-8601 is just a wee bit too flexible. Personally, I like RFC 3339 just a bit more…
Edit: that said, I would definitely agree that something along the lines of
2021-07-27T14:20:32Z
is better than any regularly accepted alternative, and I pretty much format my dates that way all the time.to be fair, you don’t parse “20” without first passing “%C”
Don’t think my bank will like it if I date forms with that.
Mine doesn’t care. It actually never occurred to me not to.
deleted by creator
How do you decide what the second will be, when you start writing it or when you finish?
deleted by creator
Nope.
Yes, and it is used only with dashes instead of slashes. This is also how date is written when you want alphabetical sorting to work on the date, too
Not necessarily. Size of time unit doesn’t explicitly mean largest to smallest. For human comprehension day first makes sense because that’s the most significant piece of data usually. Likewise for time of day the hour is the most significant piece of data.
Though for computer comprehension, absolutely yyyy/mm/dd is best hands down.