YYYY-MM-DD is the only acceptable date format, as commanded by ISO 8601.
“There shall be no other date formats before ISO8601. Remember this format and keep it as the system default”
Largest to smallest unit of time. It just makes sense.
Sorting by date would be so much better with yyyymmdd .
ISO 8601, while great, has too many formats. May I introduce RFC 3339 instead?
That is what I love so much about standards: there are so many to choose from.
YES! I wish more people knew about RFC 3339. While I’m all for ISO 1601, it’s a bit too loose in its requirements at times, and people often end up surprised that it’s just not the format they picked…
Huh, I’ve never noticed how much bloat was in ISO 8601. I think when most people refer to it, we’re specifically referring to the date (optionally with time) format that is shared with RFC 3339, namely 2023-11-22T20:00:18-05:00 (etc). And perhaps some fuzziness for what separates date and time.
YYYY-MM-DD:HH:MM:SS
Funny thing, in ISO 8601 date isn’t separated by colon. The format is “YYYY-MM-DDTHH:MM:SS+hh:mm”. Date is separated by “-”, time is separated by “:”, date and time are separated by “T” (which is the bit that a lot of people miss). Time zone indicator can also be just “Z” for UTC. Many of these can be omitted if dealing with lesser precision (e.g. HH:MM is a valid timestamp, YYYY-MM is a valid datestamp if referring to just a month). (OK so apparently if you really want to split hairs, timestamps are supposed to be THH:MM etc. Now that’s a thing I’ve never seen anyone use.) Separators can also be omitted though that’s apparently not recommended if quick human legibility is of concern. There’s also YYYY-Wxx for week numbers.
YYYY-MM-DD:HH:MM:SS+TZ
RFC3339! It’s like ISO8601, but good!
This, but all run together.
I write files/reports to disk a lot from scripts, so that’s my preferred format.
I just go for a unix timestamp and use terminal/filemanager to sort by or display the datetime
Are you talking epoch? I don’t care for that mainly because it’s not human readable. I see the use for it, but I struggle with it in practical use.
Yep. I mostly like datetimes for simple sorting. If it needs to be human readable iso is the way to go tho.
For file names, absolutely.
When I’m asking what date it is I typically know the current year.Well la-tee-dah, look at mister not-shitfaced-every-day here, bragging like a big man
I can lie under the table, puking my guts out and still remember the year.
You need more training, son.
Except the information is given least to most important, making verbal abbreviation difficult. Works great for file names though.
There’s this really cool shorthand where you drop the year because it seldom changes. It’s called MM-DD
Yeah and if you need to know what year, you can just add it to the end like this MM-DD-YY.
“I can reuse this old function if I just monkey-patch this other class to work with it, no one will have any issues understanding what’s going on”
Edit: Thought this was the programmerhumor community. For context: A monkey-patch is when you write code that changes the behaviour of some completely different code when it is running, thus making its inner workings completely incomprehensible to the poor programmer using or reading your code.
The truth. Amen
Is that why the military uses that format?
In a GMP laboratory it’s 22NOV2023 no ambiguity.
deleted by creator
DD/MM/YY and YY/MM/DD are the only acceptable ones IMO. Throwing a DD in between YY and MM is just weird since days move by faster so they should be at one of the ends and since YY moves the slowest it should be on the other end.
I’m not kidding when I ask: are there really a lot of people using MM/DD/YYYY??
I think most Americans do. Or at least it was taught that way in school when I was growing up. Maybe it’s because of the way we speak dates, like “October 23rd” or “May 9th, 2005”.
Regardless, the only true way to write dates is YYYY-MM-DD.
Thanks!
Pretty much every American I’ve ever met. Dates on drivers license, bank info, etc - all in MM/DD/YYYY … or even just MM/DD/YY
I regularly confuse people with YYYY-MM-DD
If you use DD/MM/YYYY, dumb sorting algorithms will put all of the 1sts of every month together, all of the 2nds of every month together, etc. That doesn’t seem very useful unless you’re trying to identify monthly trends, which is fundamentally flawed as things like the number of days in the month or which day of the week a date falls on can significantly disrupt those trends.
With MM/DD/YY, the only issue is multiple years being grouped together. Which may be what you want, especially if the dates are indicating cumulative totals. Depending on the data structure, years are often sorted out separately anyways.
YYYY/MM/DD is definitely the best for sorting. However, the year is often the least important piece in data analysis. Because often the dataset is looking at either “this year” or “the last 12 months”. So the user’s eyes need to just ignore the first 5 characters, which is not very efficient.
If you’re using a tool that knows days vs months vs years that can help, but you can run into compatibility issues when trying to move things around.
The ugly truth no one wants to admit on these conversations is that these formats are tools. Some are better suited to certain jobs than others.
Should just burn it all down and do. MM/YY/DD
I hope you mean YYYY, not just YY
Japan is YYYY-MM-DD, but when we talk about dates where a year is unneeded, we just cut it off which leaves it in the US standard format of MM-DD, much to the annoyance of non-US foreigners living here.
The only reason they place month as first is because it is fits how dates are read in English, but that’s not a good reason to keep that format.
It’s how it is read in English (simplified) aka american english. Brittish english doesn’t do this nonsense, the talk in the correct format (first of january etc.).
(I’m sorry if i made some mistakes, english is my second language)
I grew up with DD.MM.YYYY. But I think, MM/DD makes sense in everyday usage. You don’t often need to specify dates with year accuracy. “Jane’s prom is on 7th September” – it’s obvious which year is meant. Then it’s sensible to start with the larger unit, MM, instead of DD.
Even in writing you see that the year is always given like an afterthought: “7th September**,** 2023“.
So when you say it out loud you say 7th September, and not September 7th?
I say “The 7th of September” because I was taught British English in school.
Americans still use it in rare cases, like the Fourth of July
ISO 8601 format is the best (YYYY-MM-DD).
Came here to say this. I try to name all my docs in the YYYY-MM-DD-descriptive-name.ext format.
The only correct format. Least to most specific.
For Excel 100%
Best nomenclature for sorting.
This meme implies there’s an equal battle between MM/DD/YY and DD/MM/YY, which is nonsense. Much like imperial units, only 'murica uses MM/DD/YY.
Liberia and Myanmar also use imperial units, but they’re both starting to move towards metric in recent years so soon the US truly will be alone in that
But 'murica is big.
Only slightly bigger than Australia and Western Australia is nearly twice the size of Texas…
When talking about cultural mindshare I’d argue that the quantity of people matters more than the space they’ve been packed into
Mercator would like a word.
Mercator can say whatever it wants, it’s not involved in this discussion.
It actually makes sense when you put YYYY/MM/DD in filenames as they will be sorted pretty neat (ex: reports)
Yeah for a lot of files you probably would sort by year in the end
YYYY-MM-DD in Hungary too, that us shit is totally non logical, i cant get used to it
Fuckin wait until you hear how many feet are in a mile. You all should’ve waterboarded us harder while we were a young country.
FIvE tOMaToeS
This is literally the most logical method to name a date in text.
In what text?
In French we say “14 juillet 1789”
We don’t even say “nth day of”
In a text like “the research started at 2003-01-24”, or pretty much in any other text where you need to convey all 3 elements.
I bet you also don’t say “14 07 1789”, because that’s what MM format means.
You bet wrong
We write AND say “La Révolution a démarré le 14/07/1789” or “La Révolution à démarré le 14 juillet 1789”
Spoken numbered month are usually used in an administrative context, to ease the work of our contact.
Oh that’s right, the spoken administrative context. Same in my dd-mm-yyyy county actually. Still, I find it less intuitive than the logical yyyy-mm-dd when understanding written text.
We do that in Sweden as well. Our social security numbers are that plus 4 unique numbers. The beers I send out to stores have yyyy-mm-dd printed at the bottom.
It’s very easy to sort by this format, makes perfect sense.
Easier to sort by YYYY-MM-DD than MM-DD-YYYY tho
Dammit, I misread here. Of course, the US format is terrible.
I propose the use of MYDYDM format. So, October 15, 2023 will be written as 121350. Just to make it as confusing as possible.
And then convert that to hexadecimal, making it 1DA06
Welp. I need a bath now.
Amazing
Iso date format. Anything to do with photos is best to have in this format at the start of the filename.
It also means that by default it’ll sort by newest
YYYY-MM-DD for everything digital, DD-MM-YYYY for everything IRL.
TBH, Japanese format makes sense when you use it to name files/directories, as sorting by “name” is equivalenti to sorting by “last modified”.
equivalenti
Love typos that force me to read comments with an Italian accent
I’m actually italian, lol, but that was a genuine typo.
Free upvotes for both of you
Until you need to work across centuries. Then it’s eating paste level.
YYYY-MM-DD for files, DD-MM-YYYY for normal use
Wtf why
So its possible to properly sort by date?
A proper date sort would be YYYYMMDD
deleted by creator
Because in short, it’s alphabetical. It will always be in order by year, then month, then day. Literally like how a clock goes HH:MM:SS it’s the same thing as YY:MM:DD the right side ticks the fastest. It’s in order by hour (year) then minute (month) then second (day). SAME SAME WHY NOT
Because for 99.99% of all situations, you’d already know what year and month it is, so the most readily available piece of information should be the day.
If you already know the year and month why write it. ISO or month day are the two most reasonable. You need to zoom in not give yourself a list of options and then randomly pick one later.
2023年12月22日
令和5年12月22日
令和五年十二月二十二日
Funny that only in full Chinese (or Japanese, since 令和 represents a new emperor era in Japan?) I noticed the month is December.
It’s 22nd of November, folks
yeah i realised after, I guess some people are just really excited about Christmas
deleted by creator
I like that this includes 2 of the 4 numbers that i can understand from japanese (chinese numerals?)
Japan wins this one.
DD/MM for readability, YYYY/MM/DD for alphabetical sorting that’s also chronological.
Ironically, MM/DD/YYYY works better for chronological sorting than DD/MM/YYYY, so long as you don’t go between years.
Didn’t think I’d be saying this but the Americans have an edge over us Brits.
By this logic one might say that DD/MM/YYYY works for alphabetical chronological sort if you don’t go between months…
Have another go at this train of thought, mate… You’re basically saying “MM/DD” is better at sorting chronologically than “DD/MM”, since the year part is taken out of the equation, which is already the established consensus, and not ironical whatsoever. And the ISO standard is already to use YYYY-MM-DD, so that’s the winner IMO, hands down. Japan is simply following that but using a slash as the delimiter.
When you search or do any stable sort, I would think you want your primary attribute to be the one with most finite values? That way you are front loading the pruning of the search space.
So it’s actually on favor of Japanese style