Hacker News new | past | comments | ask | show | jobs | submit login

ISO(-8601) can go fly a kite. Dashes or forward slashes are confusable as subtraction and division respectively between numbers as year, month, and day separators. - and − do not have enough of a discernible difference to matter. Periods could work if not for the choice of using them to start file extensions. Commas are already used to group numbers in sets of 3 significant figures. Writing the year, month, and day as a sequence separated by commas is distinct as the month and day are at most 2 digits.



FWIW the symbol name specified is the Unicode "hypen-minus" symbol. The subtraction dash is a separate symbol.

https://www.iso.org/obp/ui#iso:std:iso:8601:-1:ed-1:v1:en

https://www.compart.com/en/unicode/U+002D

https://www.compart.com/en/unicode/U+2212

Edit: parent comment now reflects this.

But the point of the standard isn't to provide something that everyone likes perfectly it's to provide a well defined format for exchanging datetimes instead of dealing with personal or cultural formats during interchange.


Do you want to use forward slashes confusable as a multitude of other things, one of which is a path separator?

At least you can have a file named data-2021-11-13.csv.


I worked in Germany for two years and they use dots: 2021.11.13. I really like this and quickly adopted this syntax myself.

(I guess they do it the other way around though: 13.11.2021.)


Somes tools will parse it as a file extension


>13.11.2021

This is not only the German but most European way of writing date.


I don't think this is true, Italy uses generally slashes d/m/y or dashes d-m-y. France and Spain use slashes d/m/y. The Netherlands appear to use dashes: d-m-y. Hungary uses dots, but they use the y.m.d order. Sweden uses y-m-d.

You can play with this in JS :)

    const event = new Date(Date.UTC(2012, 11, 20, 3, 0, 0));
    const options = { weekday: 'long', year: 'numeric', month: 'numeric', day: 'numeric' };
    console.log(event.toLocaleDateString('de-DE', options));
    console.log(event.toLocaleDateString('it-IT', options));
    console.log(event.toLocaleDateString('fr-FR', options));
    console.log(event.toLocaleDateString('hu-HU', options));
    console.log(event.toLocaleDateString('sv-SE', options));
    console.log(event.toLocaleDateString('es-ES', options));
    console.log(event.toLocaleDateString('nl-NL', options));


My only grief with ISO8601 is that the way the timezones are denoted is somewhat unfortunate. Would have been nice if we could somehow have: 19:00+02:00 = 21:00+00:00 = 23:00-02:00, but alas.

I suppose I should also be annoyed that I somehow never manage to type dates in the correct format if I need to write them by hand, but I'm not sure if I can blame ISO for that.


The timezone sign convention is the same as the longitude sign convention: east is positive. The lat/long conventions are documented in ISO 6709, but they predate that standard, though I have not found a good history of it.

Note that these sign conventions are not universal: for example, POSIX has the reverse sign on timezone offsets because west positive was more convenient for american unix developers. There are similar oddities for longitude.


I can understand the reasoning behind it. But it's still unfortunate.


There is a more compact, less ambiguous, more universal format in my opinion: ddMMMyyyy, e.g. 28feb2021.

Yes, it's English month abbreviations but few people worldwide would not be able to take the obvious meaning.

(it's a MIL/NATO standard afaik, and has been in use for 50+ years)

(edit, timezones are single letter, e.g. Z for Zulu aka UTC)


Doesn't sort well.


Yeah. ISO8601 being alphabetically sortable is one of its most useful features.


GNU sort has support for month names.


sooooo....dollar signs? Exclamation points? What would you pick?


Is dd[poop emoji]yyyy[poop emoji]mm too informal?


Why not [heart emoji], these are dates after all.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: