4 ms·
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 separato
by potiuper 5y ago
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.
- zamadatix 5y agoFWIW 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.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+002D https://www.compart.com/en/unicode/U+2212 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.
- KMnO4 5y agoDo 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.
- Jaxan 5y agoI 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.)
- vasili111 5y ago>13.11.2021 This is not only the German but most European way of writing date.
- riffraff 5y agoI 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));
- BiteCode_dev 5y agoSomes tools will parse it as a file extension
- jfarina 5y agosooooo....dollar signs? Exclamation points? What would you pick?
- contravariant 5y agoMy 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.
- fanf2 5y agoThe 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.
- contravariant 5y agoI can understand the reasoning behind it. But it's still unfortunate.
- emmelaich 5y agoThere 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)
- politician 5y agoDoesn't sort well.
- catlifeonmars 5y agoYeah. ISO8601 being alphabetically sortable is one of its most useful features.
- emmelaich 5y agoGNU sort has support for month names.