Remix.run Logo
worik 6 days ago

dd/mm/yyyy date formats are cursed....

Perhaps it is mm/dd/yyyy (really?!?) that is cursed....

armchairhacker 6 days ago | parent | next [-]

dd/mm/yyyy is most common worldwide (particularly Europe, India, Australia) followed by yyyy/mm/dd (particularly China, Japan, South Korea).

https://wikipedia.org/wiki/Date_and_time_representation_by_c...

IMO the best format is yyyy/mm/dd because it’s unambiguous (EDIT: almost) everywhere.

Izkata 6 days ago | parent | next [-]

For a really cursed one that breaks your last comment, check out Kazakhstan on the list by country: https://en.wikipedia.org/wiki/List_of_date_formats_by_countr...

> Short format: (yyyy.dd.mm) in Kazakh[95][obsolete source]

o11c 6 days ago | parent [-]

Even ISO has used the cursed date format.

ISO-IR-26 was registered on 1976/25/03.

fastball 6 days ago | parent | prev | next [-]

Not only is YYYY/MM/DD unambiguous, but it also sorts correctly by date when you perform a naive alphabetical sort.

LoganDark 6 days ago | parent [-]

I believe YYYY-MM-DD is even less ambiguous than YYYY/MM/DD.

a96 6 days ago | parent [-]

Correct. Slashes mean it's a yank date and going to be backwards. Dashes hint that it's going to be (close to) ISO standard.

_Algernon_ 6 days ago | parent | next [-]

And it doesn't use a path-separator character for the date.

tom_ 6 days ago | parent | prev [-]

Slashes are used for dd/mm/yyyy as well. Dashes are indeed better if you want a separator. or use the separator-free ISO 8601 syntax.

worik 4 days ago | parent [-]

I just use the number of peta-seconds since I was born....

accrual 6 days ago | parent | prev [-]

I like CCYY-MM-DD because it's also a valid file name on most systems, and using "CCYY" (century + year) instead of "YYYY" feels fancy.

Fwirt 6 days ago | parent [-]

Except this could get confusing because the year 1976 (for example) is actually in the 20th century.

accrual 6 days ago | parent [-]

That is a good point. The "ordinal" century doesn't exactly line up with the digits in a "YYYY" format, thus "CCYY" creates some ambiguity depending on how one defines "century".

I conclude my fanciness of using "CCYY" is not useful. :)

javcasas 6 days ago | parent | prev | next [-]

mm/dd/yyyy is cursed. You parse it naively with momentjs, and some times it parses (wrong), other times it doesn't parse.

It's the reason our codebase is filled with momentAmerican, parseDateAmerican and parseDatetimeAmerican.

hollerith 6 days ago | parent | prev [-]

mm.dd.yyyy is cursed, too. The not-cursed options are dd.mm.yyyy and mm/dd/yyyy

dmd 6 days ago | parent [-]

in what world could mm/dd/yyyy not be cursed!? that makes no sense whatsoever.

Izkata 6 days ago | parent [-]

It's the US short form, matching the word-month order we always use for regular dates: "August 7, 2025".

Note the slashes are important, we don't use dots or dashes with this order. That's what GP was getting at.

chrismorgan 6 days ago | parent | next [-]

> It's the US short form, matching the word-month order we always use for regular dates: "August 7, 2025".

Counterexample: US Independence Day is called the “Fourth of July”.

I would agree that, for dates with named months, the US mostly writes “August 8, 2025” and says “August eighth, 2025” (or sometimes “August eight, 2025”, I think?), and other countries mostly write “8 August 2025” and say “the eighth of August, 2025”; but neither is absolute.

Izkata 5 days ago | parent [-]

Not really a counterexample, that's a holiday, not a regular date.

dmd 6 days ago | parent | prev | next [-]

And it makes absolutely no sense. I've lived with it all my life (I'm an American!) and it has never made any sense to me.

kstrauser 6 days ago | parent | next [-]

First, I use ISO8601 for everything. This is not me arguing against it.

But, I think the American-style formatting is logical for everyday use. When you're discussing a date, and you're not a historian, the most common reason is that you're making plans with someone else or talking about an upcoming event. That means most dates you discuss on a daily basis will be in the next 12 months. So starting with the month says approximately when in the next year you're talking about, giving the day next says when in that month, and then tacking on the year confirms the common case that you mean the next occurrence of it.

When's Thanksgiving? November (what part of the year?) 27 (toward the end of that November), 2025 (this year).

It's like answering how many minutes are in a day: 1 thousand, 4 hundred, and 40. You could say 40, 400, and 1000, which is still correct, but everyone's going to look at you weirdly. Answer "2025 (yeah, obviously), the 27th (of this month?) of November (why didn't you start with that?)" is also correct, but it sounds odd.

So 11/27/2025 starts with the most useful information and works its way to the least, for the most common ways people discuss dates with others. I get it. It makes since.

But I'll still use ISO8601.

out_of_protocol 6 days ago | parent [-]

> So 11/27/2025 starts with the most useful information

Most useful information would be to not confuse it. E.g. you see a event date 9/8/2025 and it's either tomorrow or a month from now. Perfect 50/50% chance to miss it or make a useless trip

hollerith 6 days ago | parent | prev [-]

Can you explain why on a traffic light, red means stop and green means go? Why not the other way around?

a96 6 days ago | parent | next [-]

Red is an aggravating colour psychologically. It's pretty universally used as a warning. Red lights in cars also mean "not ready to drive". Brake lights are also red for similar reason. "Seeing red."

worik 4 days ago | parent [-]

...and red car means "warning! outrageous jersey at the wheel"

Wait, no it dose not....

fc417fc802 6 days ago | parent | prev [-]

Because it's arbitrary. Unlike a date format where the components have relative meaning to one another, can be sorted based on various criteria, and should smoothly integrate with other things.

As a US native let me clearly state that the US convention for writing dates is utterly cursed. Our usage of it makes even less sense than our continued refusal to adopt the metric system.

FridgeSeal 6 days ago | parent | prev [-]

The short form doesn’t match the word form though.

If you wanted a short form to match the word form, you go with something like:

“mmmm/dd/yyyy”

Where mmmm is either letters, or a 2-character prefix. The word form “August 7th…” is packing more info that the short form.