YYYY-MM-DD everything else is wrong.
For file versioning, this is the way. So when you sort your files by name, your files sort chronologically.
It’s also the most relevant information first. I don’t care about what day it is if I don’t know what month it’s in. If it’s an unambiguous context they can just be omitted.
Not only that. Processing logs with DD/MM/YYYY in many systems will result in octal base error because of the leading 0 in dates such as 07 08 09, and don’t let me talk about how some languages read the back slash / … pukes in shell
You should be escaping all your strings first that would solve your
/
problem
sniff sniff
You smell that? They’re coming, the ISO 8601 gang.
YYYY-MM-DD OR DEATH
Easily proved to be the best: in every time travel story, the time traveler asks for the date. The unsuspecting drone always responds with DD or MM-DD, and the protagonist has to shout at them “NO! WHAT YEAR IS IT?”
Always start with YYYY.
I rest my case.
Gotta have that good sorting
Anything else is madness. It’s demonstrably the only logical answer.
DD is day in year, I think dd is what you mean. Also, YYYY is week year, so better to use yyyy.
yyyy-MM-dd
YMD is primarily used in:
China, Japan, South Korea, North Korea, Taiwan, Hungary, Mongolia, Lithuania, Bhutan, Sweden
That is one weird country group.
China and Japan switched from their old calendar system, which was using the start of their current emperor inauguration as the first year, reset with each new emperor.
So I guess it was easier to choose the only correct date format.
That just dictates what number the year starts at, not the order of writing down a date. They do traditionally go from general to specific though. When writing an address in China, you go Country - State - City - Street - Person (I forget where the postal code goes).
How the fuck did NK got here?
W E A R E H E R E
W E A R E I N E V I T A B L E
You’re god damn right
Fuck yeah
Hell yeah, brother!
ISO-8601 or bust.
I prefer RFC 3339. It allows you to omit the “T” for example. Like this: 1985-04-12 23:20:50Z
Either is preferable to the abomination in the meme.
Imo, the more strict the format the better. Less ambiguity == less confusing when it doesn’t work and easier parser to write.
Today is 2024, January 24.
It looks perfect. Although my only concern is if we should use the preposition “in” (since the year comes first: “in 2024”) or “on” (because we say “on January 24”).
It’s great when organizing something in a database. You can just do A to Z ordering and it works just fine.
However visually it’s not very good because it puts the least important piece of information first and the most important piece of information last. I probably know the current year so it doesn’t need to be that prominent, and I’m fairly certain that it’s going to be sometime this millennium, so I don’t need the date to four digits.
It’s entirely depend on the time frame range of your data. If it’s wide it rapidly becomes useful to see the year first. In general I like to put ‘larger’ group variables in tables from left to right, helps in a similar way.
Adaptation is quick. And, it helps us round up who needs to be sterilized.
Always write largest to smallest. That way it can be sorted easily starting with the year, then month, then day.
Or as computer people say, big-endian.
Computer ponies say it too
We should all just write it in ISO 8601
Largest to smallest? So should I write December 02, 2024 as 2024/12/02? And then February 12, 2024 as 2024/12/02?
/s
Unironically yes, because it makes it easy to sort by date.
When you sort by name, the year will get sorted first, then the month, then the day. So it’ll sort like this:
2021-05-19
2021-07-23
2023–06-20Notice that everything is sorted chronologically. But if you do MM-DD-YYYY then you get this instead:
05-19-2021
06-20-2023
07-23-2021Notice that the 2023 date is between the two 2021 dates. This is even worse if you do DD-MM-YYYY, because now the first number is changing constantly. It may not be a problem with only three dates, but imagine a spreadsheet with 2000+ entries, or a folder with dozens of files archived by date, to allow for potential rollbacks, versioning, etc…
There’s a reason ISO standards for timestamps list things big to small: YYYY-MM-DD hh:mm:ss in that specific order every time.
You misread. The second part sorts 12 before Feb because 12 > 02, making both dates identical.
What if I want to easily sort the day or month?
I bet you write your time as ss:mm:hh you silly little guy, you small to large clown you. Break up with him babe, you can do better
D/Y/M/D/Y/M/Y/Y
2/2/0/3/0/1/2/4 <- Today’s date in this obnoxious format
Pure beauty.
Curious why you didn’t go for
DYMYDYMY
.2/2/0/0/4/2/1/4
Thank you for illustrating my point. Much better.
looks better when you remove the slashes
Imagine not using milliseconds since Jan 1 1970 GMT
The 32-bit computers will have no idea what to do once they reach 19 January 2038. They’ll have reached their integer limit by that point.
Is that Kirk?
Yep; William Shatner.
Bill Shats. Master and Commander of the Deathstar Galactica.
dump him
Back in the 2000’s it was way more confusing. The appointment is on 10/09/11, when the hell is that?
11 am on the 10th of '09. Month, millennium, century and month are free to choose by the reader.
Best date was 11.11.11
There was a loud countdown to 11:11:11 o’clock, the teacher was powerless
Wow. I can imagine.
Let’s add more granularity, like hours and minutes:
MM:HH DD/MM/YYYY
wait…
Little-endian number formats are the only way to go in the year 4202.
TIL that I am a member of a gang.
The ISO 8601 gang.
JD/YYYY (Julian Date/Year)
Fuck you JD Edwards for making me think about leap years
Logical? So if we use the same logic for money, that big mac will be $17.5
DD Mmm YY
A p, d B, Y