6 ms·
DD/MM/YYYY also makes no sense because it doesn’t sort lexicographically and each component is big endian but the overall date is little endian. Only YYYY/MM/D
by mulmen 3y ago
DD/MM/YYYY also makes no sense because it doesn’t sort lexicographically and each component is big endian but the overall date is little endian.
Only YYYY/MM/DD HH24:MI:SS makes sense. Choose your sepators.
- bearmode 3y agoIn everyday use, the year is the least important part. It makes perfect sense in many cases. It's in order of most relevant information to least. YYYY/MM/DD HH:MM:SS has its place as well, but not here.
- mulmen 3y agoHow do you write the time? Do you put seconds or minutes before hours? Why not? How do you write the year? Do you put decade before century? How do you write numbers? Do you put the ones place before the tens? Toddmorey asked why units don’t go from small to large and I explained that it is inconsistent with how we write numbers. Thus, there’s no logical reason to do anything other than large to small. Anything other than ISO 8601 is preferred only for familiarity and no such inconsistent format is inherently more correct or logical.
- bearmode 3y ago>How do you write the time? Do you put seconds or minutes before hours? Why not? No, because the seconds are rarely important. >How do you write the year? Do you put decade before century? No, because that's not how numbers work. >How do you write numbers? Do you put the ones place before the tens? Same answer. >Toddmorey asked why units don’t go from small to large and I explained that it is inconsistent with how we write numbers. Dates aren't numbers. There is a lot more context and meaning around dates that we need to consider when we verbalise and write them. But, for the purposes of e.g. data storage then absolutely - we can consider them no different from numbers. You have to understand that isn't the case with conversational English, though.
- mulmen 3y ago> You have to understand that isn't the case with conversational English, though. Yes, conversational english is arbitrary. The preference there is the familiar so the listener understands. But both commonly used date formats (MM/DD/YYYY HH:MI:SS and DD/MM/YYYY HH:MI:SS) are inconsistent and arbitrary. You can’t say one makes more sense than the other because that’s just a matter of personal familiarity.
- pratik_kanthi 3y agoOh really? I guess we’ve all been doing it wrong for centuries! Perhaps while we're at it, we should propose a new system where the months come before the days, just to keep our dates in perfect lexicographic order. Who needs tradition and worldwide acceptance, when we could have perfectly sorted dates?
- dannyobrien 3y agoWelp, that's what ISO 8601 is there for: https://en.wikipedia.org/wiki/ISO_8601 https://en.wikipedia.org/wiki/ISO_8601
- mulmen 3y ago> Perhaps while we're at it, we should propose a new system where the months come before the days, just to keep our dates in perfect lexicographic order. No need. ISO 2014 was recommended in 1971 and issued in 1973. If you have chosen any other textual representation of date and time for data interchange you are in a very literal sense doing it wrong. https://en.m.wikipedia.org/wiki/ISO_2014 https://en.m.wikipedia.org/wiki/ISO_2014
- tuatoru 3y agoWe didn't need sorted dates before we started using unstructured media to store information. Hand-written accounting journals, day books, have date ordering built into their physical substrate. It didn't matter how dates were given orally (some places: "today is the 23rd of June 1844"; others: "it's June 23, 1844 today"); nor did it matter that this ordering was transcribed onto the paper, using month numbers rather than the names of the months. Now we do need to sort dates, so let's turn Japanese. 1. https://en.wikipedia.org/wiki/Date_and_time_notation_in_Japan https://en.wikipedia.org/wiki/Date_and_time_notation_in_Japa...
- dacryn 3y agolexicographically sorting is of lower interest to me than the other advantages. yours would also require padding numbers with leading zeroes. If you need sorting, use a tool that understands dates, simple as that. Many tools do, just some common businesss microsoft tools don't. Humans think day/month or month/day, they have absolutely no interest in reading the year first.
- mulmen 3y agoDates should be persisted as intervals since epoch where the interval is the finest grain required. This is what enables more sophisticated tools to do sorting and change representations. But this is a conversation about text formatting of dates. The standards for this are well established. Yes, padding is required and assumed. > Humans think day/month or month/day, they have absolutely no interest in reading the year first. Humans prefer what is familiar. Speaking as a human, for me that’s ISO 8601.