- Unambiguous.
- Actually sortable.
- A standard (ISO-8601).
- Still human-readable.
- Is not tied to English.
I don't like to put parentheses in filenames if I can avoid; may require shell escaping. - Unambiguous.
- Actually sortable.
- A standard (ISO-8601).
- Still human-readable.
- Is not tied to English.
I don't like to put parentheses in filenames if I can avoid; may require shell escaping.Edit: Good point, bashinator <3
Sure :)
But to their credit, @bpicolo makes a very valid point.
Edit: I also think that you don't need to be involved in tech in any way to be aware of date formats. They show up in all kinds of everyday places like tax documents, bills, cheques, receipts, exams, etc.
October 15, 2023... octo... that must be... the 8th month!
Could say that there's still a small amount of ambiguity, but it's definitely not "as ambiguous as" ??/??/YYYY.
> unless you’re a tech persona with precursor knowledge of date formats
YYYY-MM-DD is the standard for billions of people. You don't need to be a tech persona to either use it or to understand the reasons for it (lack of ambiguity, consistency with other numbers).
https://en.wikipedia.org/wiki/Duodecimal
So M is one of {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ↊, ↋}.
U+218A ↊ TURNED DIGIT TWO
U+218B ↋ TURNED DIGIT THREE
There are other contenders for the 11th and 12th symbol, but all of those systems seem to assume counting from 0, which is... not a very fortunate choice: Human calendars generally numerate the first month as "1", not "0". So duodecimal does not get my vote for less ambiguity on either the account of determining what symbols to use, or where to start the sequence. :-)The problem is that it is not unambiguous.
If you see 2023-03-02 in the wild there will be people who assume it is 3rd Feb.
Please correct me if I am wrong.
You are wrong. Noone would assume YYYY-MM-DD would be YYYY-DD-MM. Why would they? Biggest, smaller, smallest unit. After that comes the time with Hour, Minute, Second. Again Biggest, smaller, smallest unit.
Saying “No one would assume” is only reasonable if you decide to ignore how human beings behave.
The international standard is pretty old by now, I learned it as a child.
When sorting, the year is most important. Instead of everything published on the first in each month ending up at the start of the list, you get everything published today at the top.
1/1/2039
1/1/2038
1/1/2002
1/2/1970
1/2/2025
If you write “2023-02-03” you can be certain that a >0% of humans will read that as March 2 2023 because that’s what humans do.
And just to be clear, Where I live we do DD-MM-YYYY and as a dev I’m absolutely on board with YYYY-MM-DD.
But it’s not being used by anyone! It’s just a possible permutations, not in cultural use.
I could imagine two kinds of wrong reasoning that would lead to misinterpret YYYY-MM-DD:
An American who, in spite of being used to read dates aloud (05-01 = May 1st) decides that since the year comes first, the whole sequence is probably in reverse.
A European who, in spite of being used to a logical ordering, decided that since it unusually starts with the year, maybe it’s an American date.
I can imagine those mistakes being made.
I also think they are very unlikely to happen, and vastly less likely than Americans who read European dates and literally can’t tell, or vice versa.
The only widely used date format that does not have a competing interpretation is YYYY-MM-DD. For that reason alone, it is less ambiguous.
Can you provide an example of a country/nation/population that uses YYYY-DD-MM as their standard date format?