4 ms·
YYYY-MM-DD: - Unambiguous. - Actually sortable. - A standard (ISO-8601). - Still human-readable. - Is not tied to English. I don't like to put paren
by sshine 3y ago
YYYY-MM-DD:
- 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.
- jp57 3y agoThis is the way.
- bpicolo 3y agoIt’s not unambiguous. 2023-01-02 is as ambiguous as 01/02/2023 unless you’re a tech persona with precursor knowledge of date formats. Edit: Good point, bashinator <3
- bashinator 3y agoBad example; 01/01 is unambiguously Jan 1 no matter how you read it.
- nobrains 3y ago@bashinator Sure :) But to their credit, @bpicolo makes a very valid point.
- AlexandrB 3y agoI think it's definitely less ambiguous because there are no locales (that I know of) that use YYYY-DD-MM, whereas MM-DD-YYYY and DD-MM-YYYY are both quite common. So, with a little bit of experience, if you ever see four digits first you can be 99% sure that the next part of the date is the month. 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.
- bpicolo 3y agoFor contexts where you want humans to understand and don't need lexical sorting (paper documents definitely fall into this category), you can make it super unambiguous – July 15, 2023. Can't mess it up.
- sshine 3y agoChallenge accepted! October 15, 2023... octo... that must be... the 8th month!
- Ukv 3y ago??/??/YYYY is ambiguous because ~3 billion people use DD/MM/YYYY whereas the US uses MM/DD/YYYY. Nobody (or very few) uses YYYY-DD-MM, so YYYY-MM-DD won't be confused with it. 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).
- fatfingerd 3y agoUsing duodecimal for the month will clear that remaining confusion right up, YYYY-M-DD.
- sshine 3y agoUnicode has you covered! https://en.wikipedia.org/wiki/Duodecimal 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. :-)
- nobrains 3y ago- Unambiguous 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.
- Moru 3y agoCan't resist that challenge :-) 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.
- manuelmoreale 3y agoI mean, why would anyone have a problem with DD MM YYYY by the same reasoning? It’s smallest, bigger, biggest after all and yet the problem is well known. Saying “No one would assume” is only reasonable if you decide to ignore how human beings behave.
- Moru 3y agoVariants exists for MM/DD/YYYY and DD/MM/YYYY (medium, smallest, biggest). No variant exists for YYYY-MM-DD, nothing to confuse. 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
- manuelmoreale 3y agoI honestly don’t understand what you’re trying to say here. A variant does exist and it is YYYY-DD-MM. Is it a reasonable one? No. Do people in the real world only do reasonable things? Also no. 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.
- david422 3y agoI've been using this for a lot of date display for all those reasons.