4 ms·
Please clarify your date format. Is that 1st of March or the day before 4th of January? According to my European sentiment it's the 3rd of January, is that corr
by Torwald 6y ago
Please clarify your date format. Is that 1st of March or the day before 4th of January? According to my European sentiment it's the 3rd of January, is that correct?
- rcoveson 6y agoThere are many ambiguous date formats, but this is not one of them. Four digits, delimiter, two digits, delimiter, two digits always means year, month, day, no matter where you are in the world[0]. Well, except in Kazakhstan, but only when writing in the Khazakh language. 0. https://en.wikipedia.org/wiki/Date_format_by_country https://en.wikipedia.org/wiki/Date_format_by_country
- cyode 6y ago> There are many ambiguous date formats, but this is not one of them. The comment you've replied to is a counterexample to this claim.
- rcoveson 6y agoThat's true, but it takes more than one example of confusion to justify the label "ambiguous." Otherwise the label would have no meaning; it could be applied to anything that had ever caused anybody confusion, which is everything. For example, the meaning of the word "ambiguous" is not ambiguous. If somebody were to ask what the word meant because they did not know the definition, it wouldn't make the word's meaning ambiguous. It would make that person uninformed.
- sjwright 6y agoConfusion due to a lack of awareness of an unambiguous standard is not synonymous with ambiguity.
- avmich 6y agoMost often I see this as an example of ISO 8061 date, https://www.iso.org/iso-8601-date-and-time-format.html https://www.iso.org/iso-8601-date-and-time-format.html . "Looking for an unambiguous calendar-and-clock format that is internationally understood? It’s time for ISO 8601." "ISO 8601 tackles this uncertainty by setting out an internationally agreed way to represent dates: YYYY-MM-DD For example, September 27, 2012 is represented as 2012-09-27."
- titzer 6y agoYes, yes, yes, please use ISO 8601! Big-endian is the only rational way to sort dates and it combines nicely with time-of-day as well.
- sargun 6y agoBig endian is also much easier to read as someone who reads from left to right.
- sargun 6y agoYep. Although I don’t use ISO8601 for time stamps when communicating online (for 2021-03-01T00:00Z is more confusing to me than 2021-03-01 16:00 PST8PDT), it’s easier to use for dates when discussing in an online forum where people may be from outside of the US.
- grzm 6y agonit: ISO8601 permits offsets: you don't need to always use UTC/Z. 2021-03-01T16:00-0800 works just fine.