Hacker News new | ask | show | jobs
by TimK65 26 days ago
So thankful that we use the correct date format (yyyy-mm-dd) in Sweden.
8 comments

Can I just say that, as someone born and bred in the UK, YYYY-MM-DD is the only correct way to display a date wherever you live.

Anything else is as bad as using mm:hh...

as someone born and bred in the UK, YYYY-MM-DD is the only correct way to display a date

Do you also address your mail to "United Kingdom, Scotland, Edinburgh;" or tell people, "I'm going on holiday to Croatia, Split?"

I do write Lisbon, Portugal, whenever I talk about where I live. Doesn't take much extra effort to provide more precision and avoids possible confusions.
You probably should, actually.
TIL mm:hh is a thing o_O
> Anything else is as bad as using mm:hh...

Please tell me that's not a thing.

Just look at your crontab, love.
It is now.
In a moment of whimsy I briefly considered a date format where digits were sorted alphabetically.

2026-07-02-16-31-52 -> -----00011222235667

Hopefully it will remain a nonsense and never be seen in the wild, unlike the phone number field which I found on a real website which responded to scroll events to increase and decrease the value it contained.

Well that's just totally ambiguous. What you should do instead is treat the date as one long number and present its factors, for instance 2⁴⋅11⋅7649⋅15050023, much more practical.
I rarely have cause to give people my phone number anymore, but I always like to give it as three billion, 128 million, …
That's not alphabetically, that's asciibetically. The alphabetical (English) sort would be something like ::--51176632222000
How about just sort the numbers from biggest to smallest?

2026-07-02 16:45 becomes

2026-45-16-06-02

Bonus points for using a very confusing separator... Maybe {?

> Bonus points for using a very confusing separator... Maybe {?

I vote for "end of unit" (ASCII 0x1F).

Wait, can this format be transformed back to the "normal" format? If so, then it could be kinda viable for some operations... :thinking_emoji:
No, it can't be transformed back because it has lost information.

2025-06 and 2026-05 both have the same digits, for example.

No, it's an unreversible hash function. I use this for passwords - no one will ever be able to figure out what ehntru2 was originally.
No, because "12".sort_by_digits() == "21".sort_by_digits()
Well it's a NUMBER
Wrong decimal tho.

Why isn't there an en-EU or en-ISO locale that has:

  - yyyy-mm-dd
  - SI units
  - 1,234.56 number format
It is possible to define a custom locale with these features, e.g. https://andrew.kvalhe.im/2022-09-09

  $ echo "$LANG"; date
  en_US.UTF-8@aspirational
  2026-07-02T11:17:00-07:00
The European Commission published its own language guide. In terms of English it's only a small deviation from en-GB, but my first thought was indeed: when can I set en-EU?
Do you have a link to this publication?
https://knowledge-centre-translation-interpretation.ec.europ...

> This style guide is intended primarily for English-language authors and translators, both in-house and freelance, working for the European Commission.

It specifies formats for date, numbers etc.

I can tolerate the comma as thousands separator, but I hate the dot as thousands separator. Use a space or ' if you want to be fancy.

I wish we’d rip the bandaid off and invent a new character that makes it unambiguous across the world.

Because that comma is a crime against legibility.
Nowadays the recomended thousands separator by most international standards is a blank space.

And having been raised in the continent, I personally find using commas for thousands disgusting.

as an American this is my favorite format. Sortable, and the mm-dd order reflects the standard American way of writing month+day, and yyyy is unambiguously the year since it's 4 letters. Best of both worlds.
This format is an American?
That's also the ISO standard since it sorts correctly
I believe it's the ISO standard because it is obviously distinguishable from both the MM-DD-YY (US) date order and the DD-MM-YY (UK/EU/Others) date order and so is unambiguous.

https://www.iso.org/iso-8601-date-and-time-format.html

The fact that they are then sortable is a nice side benefit!

Although my (AU) locale is dd-mm-yyyy, I'll use yyyy-mm-dd anywhere I have to write a date in all numbers to avoid any ambiguity. It also has the advantage of sorting correctly in things like file names.

For something more likely to be read by a human and not parsed by a computer (and is not locale or i18n/l10n flexible) I'll use d mmm yyyy, e.g., 3 Jul 2026. To my thinking, for English speaking this is the friendliest unambiguous format (although I'm sure opinions will differ).

"Friday 3 July 2026" (yes, I elected to spell out the month) also has the advantage of not requiring commas for legibility ("Friday, July 3, 2026" being common in the US).
Yeah, I'll add the abbreviated day ("Thu 3 Jul 2026") where it makes sense to.
I've taken to using the Swedish locale for that very reason (French-American living in the UK).
Vad himla pratar du om? ALLT använder dd/mm-yy. Jag har aldrig sett något på svenska som använder yyyy-mm-dd, det finns bara inte. Det finns i Sverige, men då är det också på engelska.
"Vad himla pratar du om?"? I in my turn have never heard that expression before, so who's zoomin' who, baby?
The superior date format. Superior to all others.