5 ms·
The best date format, in my humble opinion: yyyy-mm(mmm)-dd 2023-07(Jul)-12 ... Why? - Goes from biggest to lowest value (year, then month, then day) - To
by nobrains 3y ago
The best date format, in my humble opinion:
yyyy-mm(mmm)-dd
2023-07(Jul)-12
...
Why?
- Goes from biggest to lowest value (year, then month, then day)
- To remove any ambiguation, also shows month in alpha format.
- Still sortable :-D This is the best part I think.
- JohnFen 3y agoI've been arguing this for decades. I'm glad to see that I'm not alone!
- notatoad 3y agooh good, another date format. https://xkcd.com/927/ https://xkcd.com/927/
- omoikane 3y agoSee also https://xkcd.com/1179/ https://xkcd.com/1179/
- itake 3y agoThis assumes the users speak English, which continues to dance around the problem of the format not matching the user's preference (language and date format).
- rovr138 3y ago> This assumes the users speak English Where's the assumption? On the alpha portion? The date internally can be stored as it is, this is only the display and the alpha portion can be localized.
- itake 3y agoIf you can customize the display based on the user's device, then we are back to the current problem of companies not customizing the display based on the user's device. My understanding is people want a format that machines and computers can read without introducing a translation layer.
- notatoad 3y ago>the alpha portion can be localized but can it? if you're putting dates in something like filenames or CSVs, then no, it can't be localized. you get one string, and that's it. if you're displaying a date in an app, then whatever platform you're targeting probably has some method to diplsay a localized date, and you should use it. but for anywhere that you have to choose a date format, that probably means you don't get to localize.
- sshine 3y agoYYYY-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.
- deleted 3y ago[deleted]
- tomjakubowski 3y agoWe're lucky enough that almost nobody is (yet) using yyyy-dd-mm, so fortunately ISO 8601 is still pretty unambiguous in the real world.
- nobrains 3y agoYes, but in the wild, lay people can easily assume yyyy-dd-mm. See this: https://news.ycombinator.com/item?id=36699269 https://news.ycombinator.com/item?id=36699269
- tomjakubowski 3y agoMy claim is that almost nobody would jump to that interpretation because there is no pre-existing convention with year first and day and then month. I guess if you'd never seen an ISO date before, and you were accustomed to DD-MM-YYYY, then it could still be ambiguous. It's all context dependent anyhow—who's to say 2023-07-13 is a date and not an arithmetic expression, or a code in some filing system that happens to look like a date.
- renewiltord 3y agoSadly, my arguments that URLs should follow the same logic (instead of middle-out) and go something like: .com.example.sub/path/to/folder/and/file.html have yet to meet success. I suppose it's because the date format naming has a great immediate effect: sorting a folder by file gives you intended-time sorting as well (which may not match creation time if you copy or download the file). Though of course I only use numbers in the name - no month name.