ISO 8601
ISO 8601
ISO 8601
Everyone should use date-time groups so we're all on the same page down to the second.
DDHHMMSSZmmmYY
As a Hungarian, I approve.
The sane way of dealing with it is to use UTC everywhere internally and push local time and local formatting up to the user facing bits. And if you move time around as a string (e.g. JSON) then use ISO 8601 since most languages have time / cron APIs that can process it. Often doesn't happen that way though...
This is what I try to do in the few apps I've written that had to deal with dates and times
People aren't computers.
I think you skipped part of the sentence.
Sounds like something a terrorist would say.
Working for a global clinical research company, DD-Mmm-YYYY is the easiest for everyone to understand and be on the same page. It's bad enough identifying which date you're capturing in metadata without also trying to juggle multiple date formats.
I’m not a computer and this isn’t work so I’m gonna just use my confusing date format.
I propose that we amend the ISO to require the days of the week be named after their etymological roots in that language.
English Days of the Week:
Day of the Sun
Day of the Moon
Day of Týr
Day of Odin
Day of Thor
Day of Frēa
Day of Saturn
Imagine dating a meeting, "Day of Odin, May 7, 2025." Imagine a store receipt that says, "Day of Thor, June 5, 2025." Imagine telling a friend, "July 4th falls on a Day of Frēa this year!"
THIS IS WHAT WE COULD HAVE. THIS IS WHAT WE HAVE LOST. THIS IS WHAT WAS STOLEN FROM US.
We could bring it back. We could make this the norm. We could make this real. We could summon this bit of ancient magic back into our world. Let's remember what we actually named these days for! BRING BACK THE DAY OF THOR!
Where I live, "DD. MM. YYYY" is the standard but some old tombstones use
Do you know why one would ever do that? 20(02/05)25 feels like the "Don't Dead Open Inside" of dates.
ISO 8601 allows all kinds of crazy time stamps. RFC 3339 is much nicer and simpler, and the sweet spot is at the intersection of ISO 8601 and RFC 3339.
Then again, ISO 8601 contains some nice things that RFC 3339 does not, like ranges and durations, recurrences...
You know, I used to think ISO 8601 was just a boring technical standard for writing dates. But now I see it’s clearly the first step in a grand master plan! First, they make us write the year first, then the month, then the day-suddenly, our beloved 17.05.2025 turns into 2025-05-17. My birthday now looks like a WiFi password, and my calendar feels like a math equation.
But it doesn’t stop there. Today it’s the date format, tomorrow we’ll all be reading from right to left, and before you know it, our keyboards will be rearranged so QWERTY is replaced with mysterious squiggles and dots. Imagine the panic:
“First they came for our dates, then they came for our keyboards!”
At this rate, I’ll be drinking mint tea instead of coffee, my local kebab shop will start offering lutefisk shawarma, and Siri will only answer to “Inshallah.” The right-wing tabloids will have a field day:
“Western Civilization in Peril: Our Months and Days Held Hostage!”
But let’s be honest-if the worst thing that happens is we finally all agree on how to write today’s date, maybe world peace isn’t so far off. Until then, I’ll be over here, clutching my calendar and practicing my right-to-left reading skills… just in case.
(Don’t worry,this was just a joke! No offense intended-unless you’re a die-hard fan of confusing date formats, in which case, may the ISO be ever in your favor!)
Peace!
I work at a global company an in my team there are people from 5 continents. we use 27-Feb-23. It's the only way nobody gets confused and it's only 1 char more. (Tbf nobody would be confused only my boss that is american lol)
Is that February 27th 2023 or February 23rd 2027?
Are you planning stuff 2 years ahead already?
I would still be confused by this..
Stupid smarch 2nd
I am a big fan of iso 8601, I just wish it was possible to write more dates than February 27th, 2013 with it
Yeh but for that one day though, everything just works so well.
Harhar
I feel like YYYYMMDD (without dashes) might be a format in ISO 8601, but I'm fully expecting to be corrected soon. But I didn't say think, I said feel. YYYYMMDD has a similar vibe to YYYY-MM-DD, ya feel me?
It is. Photos and code merges use it.
Nope, you are correct! From the Wikipedia page, which cites the standards document:
- Representations can be done in one of two formats – a basic format with a minimal number of separators or an extended formatwith separators added to enhance human readability. The standard notes that "The basic format should be avoided in plain text." The separator used between date values (year, month, week, and day) is the hyphen, while the colon is used as the separator between time values (hours, minutes, and seconds). For example, the 6th day of the 1st month of the year 2009 may be written as "2009-01-06" in the extended format or as "20090106" in the basic format without ambiguity.
So xkcd got a detail wrong? I'm cancelling my subscription!
My goodness, some of the comments in here must come from people who thought that those writing the standard were morons who did no research.
Rich is right, since this is the date format that sorts correctly in filenames.
Omg thank you!! Everyone sees my notes thinks I'm crazy for obsessing... It's the correct fucking sort!
Won't be true after 9999-12-31, however.
If I, my software, or my data last this long, I will have nearly 8000 years to resolve it. Which is to say, the year 9998 is going to get busy.
If humanity survives until then, we can implement 9-digit dates and delay the problem until Y100K.
Oh no! The Y10K bug!
Can be solved with a small shellscript adding a leading zero to all filenames with the format.
natural sort ftw
I’d be curious to see a sorting algorithm that doesn’t handle YYYYY-MM-DD with YYYY-MM-DD properly. If you drop the dashes you still get a proper numeric order. If you sort by component, you still get the proper order. Maybe a string sort wouldn’t? Off the top of my head the languages I’m thinking either put longer strings later, giving us the proper order, or could put 1YYYY- ahead of 1YYY-M so maybe string sorting is the only one that’s out.
There are several people in the comments saying they have to use 27 Feb 2013 because they work with people all over the world. I’m really confused - what does that solve that 2013-02-13 does not? I know that not every language spells months the English way so “Dec” or “May” aren’t universal. Is there some country that regularly puts year day month that would break using ISO 8601 or RFC 3339?
When someone asks you what date it is, no one says it's 2025 May 5th. We all know what year it is, and we all know what month we are in. It's the day component that is usually the unknown.
That's locality of reference, though, similar to how you can say "here" or "there" for spatial coordinates. Everybody is aware of the year and month, so you omit it as given. The order of significance is still year, month, day.
Imagine if a harried time traveler jumped out of their time machine and asked you the date. Would it make sense to say, "Why, it's the 1st." (Or more possible, if a friend awoke from a coma.) If you ask somebody when they were born, most people will give the year at minimum. Of course, there are some weirdos out there, and you recognize them when you ask when they were born, and they say, "on a Tuesday." Same for the date of the Norman invasion of Great Britain. If you don't already have some sense of history, then knowing it happened about the 20th isn't very edifying.
we all know what month we are in
Literally had two coworkers today that did not realize it was May
Writing dates is usually in order to keep track for the future, when the year and month may be different.
It solves the familiarity problem, when getting somebody to do something by a date they readily understand at a glance takes precedence over making everybody in the world change a lifelong habit.
27 Feb 2013 is unambiguous- regardless of where you're from or how you write your dates, you can't confuse 2013 for the month or day, you can't confuse Feb for a day or week, and if you can't figure 27 out, then we have bigger problems!
I used to work for a company that agreed with you, well at least some clown in management did. Even though it was an Australian company, at least part of the problem was we had an office in Manila, and they speak "American English" which seemed to include the awful date system too. We dealt with a lot of files being issued to clients / received from vendors etc. Because the "official" system used those fucked up dates, everyone ran their own secondary sets of data folders in / out with everything done in ISO dates so you could actually sort it properly.
2013-02-27 is also unambiguous unless you’re aware of a country that uses year day month, is not?
Which I was the justification used when my work decided to use 2025-May-01.
It’s close enough to the iso date that nobody will be confused but with that 1 extra layer of security blanket to separate months and days.
Of course, that does ruin sorting, so I think it was a bit silly, nobody has ever used yyyyddmm so it’s all a bit theoretical to me.
27 Feb is no more or less ambiguous than 02-27. The problems are when you choose a proper example, like 03/02
It's the only way.
There is still confusion to be had before 1582-11-29
This is the way.
Alt text:
ISO 8601 was published on 06/05/88 and most recently amended on 12/01/04.
Might be the best xkcd alt text of all time. I knew if from memory, and as soon as I saw the comic I thought "I bet someone quoted the alt text in the top comment".
But… that’s not the right way. Are you saying the ISO8601 violates ISO8601?
Feb 27th 2013
Boom. Everything is in a different format so you can order it however you want and it's still readable.
Why use abbreviations in your preferred language when you can have a solution that is language-agnostic and universal (for a given calendar) ?
Because if there's one problem simple enough that I trust an LLM or translation app not to fuck up, it's simple translation of month labels from on language to another. If you're writing in English, it's reasonable to have month abbreviations in English. If someone wants to read it in a different language, they're going to have to use translation software or hire a human translator to do it. And regardless of translation method, simple date translation will be among the most reliable and faithfully translated parts.
That format near the cat's tail should have used hue to differentiate year/month/day...
Is that the same guy who wrote Standards? tsk, tsk.
RFC-3336
I figured there were problems with existing calendars, so I created a new one to supersede all others. That reminds me, though: I need to declare the "official" format for the calendar, to avoid all this nonsense.
I see a window of opportunity, here. Normally, there's no chance for any calendar revision to succeed in adoption; however, I think if I use the right words with the President, I could get it pushed into adoption by fiat. Y'all had best start learning my new calendar to get ahead of everyone else.
Note for the humorously disadvantaged: the Saturnalia Calendar is a mechanism through which I'm playing with a new (to me) programming language. I am under no disillusion that anyone else will see the obvious advantages and clear superiority of the Saturnalia Calendar, much less adopt it. And no comments from the peanut gallery about the name! What, did you expect me to actually spend time thinking of a catchy name when a perfectly good, mostly unused one already existed?
I'm partial to the IFC.
I'm more into the FRC.
If it isn't carved into a sheet of limestone using the Mayan character set, I don't want to read about it.
That's where I started. I wanted a little project to try V on, and had come across the IFC, so I wrote a thing. While I was doing that, I got to thinking about the deficiencies and inherited complexities in IFC, and thought up Saturnalia.
If you pop up to my profile in Sourcehut, you'll find a similar program - just a lot longer and more complex, for IFC.
I don't know if they makes me a genius, but yes. Yes it does.
Hey, I quite like this! You're the first person I've found that's thought of fixing the calendar by adopting six-day weeks. I have a very similar personal version, with two main differences:
I also came to the same conclusion about workweeks. With two-day weekends, the Gregorian calendar has 71 % of workdays but the new calendar only has 67 %. On a thirty-day month this means 20 workdays instead of 21,5. Having the six-day week could also theoretically allow for a move to three- or two-day weeks in a post-scarcity future and doing away with weekends, as well has having either 50 % or 67 % of the workforce being active every day of the week, and not the wild levels of fluctuation seen today. Not having 100 % commuting some days of the week and a fraction of that on others would allow to scale things like transport infrastructure much more effectively
Why does nobody mention the Discordian calendar? 5 days per week, 73 days per month, 5 months to a year (Chaos, Discord, Confusion, Bureaucracy and the Aftermath). On leap years, it adds one additional day (St. Tib's day) with a name but no numerical date.
I'm a pope, but then, we're all popes.
My problem with Discordianism is that it's all 5s, when 6 is clearly superior, and 12 trumps them all.
Hail Eris.
I regularly work with Americans, Canadians, and Europeans. So many times each group defaults to their own format and mistakes occur I gave up on all the formats listed by OP. If i have to write a date in correspondence its like: Feb 27th 2013. No ambiguity. No one has ever challenged me on it either. It is universally understood.
Jokes on you, I can't fucking rember which English month is which. April, May, July and Autum is just a grey mass to me.
I prefer 27 Feb 2013, it's how my work writes dates.
My biggest point of professional pride was the time my boss sent a mass group text to all his employees asking them to format dates the way I do
He didn't say it was the format I used, so I didn't speak up and say "it's actually ISO-8601," because I assume my coworkers who were used to writing things like "February 27 8:00-4:45" rather than "2013-02-27 8:00-4:45 (8:45)" may stab me
I prefer 27. Feb. 2013
I was introduced to ISO 8601 in the US military. Yay standardization!
You meant 27th Feb 2013, right? It is utterly moronic to have day in the middle irrespectively if you start with or finish on the year.
I assume it depends on geographical region, but I've never heard someone say out loud "27th of February, 2013." It's always "February 27th, 2013." Writing it down like that could be easier to parse for people who are used to that format
You meant 27th Feb 2013, right?
Does it matter anymore with this format? You figured out the exact day, month, and year irrespective of the order.
Until microsoft makes that the default down in the lower right corner, I don't think we'll make much headway. I've been trying to get my office to do their dated files in YYYYMMDDHHMM for years. I do mine that way but I can't get anybody else to comply. This meme lists that as a discouraged format, I guess the dashes are ISO but I don't care about the dashes. I would accept doing YYYY-MM-DD over MMDDYYYY any time though.
All my coworkers now know that’s how dates work… I send out all of the reports and they can tear YYYYMMDD out of my arthritis-ridden hands
The dashes make it far easier for regular humans.
ISO 8601 recommends inserting a T
between the calendar date portion and the time of day portion. So: 20250501T2210+00
.
The Microsoft thing is entirely regional. It's not that Microsoft does dates a certain way, it's your regional defaults. I live in a country that does dates the ISO and the computer displays them thay way.
Someone once told me that american date format follows the same pattern as regular speech. Like "26th of April, 2004. It made some sense to me, but that still feels a silly reason to discard just the sorting benefits.
This standard would have probably caught on if they wouldn't have gone and made it backwards.
Objectively you are more likely to need to know the day first, then the month then the year, and when people get lazy they always just leave off the year because it is assumed, but if the year is first you have to say the whole thing or sound stupid.
Depends on the purpose. For documents (especially those on which people work collaboratively over long periods of time) I find YYYY-MM-DD ideal. It spares the issues around day or month first when Europeans and people from the US work together, the document are easy to sort and, if it takes more than a year to complete the project (as is often the case in research) things don't get messy.
Run a business? Infuriate and baffle your accountants by insisting to do all business and keep all records according to a lunar calendar.
In daily speech you're correct, but the ISO standard isn't meant for daily speech. It's meant for timestamps and archives that can be queried in a systematic manner. In that case, the natural ordering is to narrow down the search by year-month-day.
Yeah that's more human-readable, but not easily sortable.
Upset we didn't get a "Half a score, two years, two months, and four days ago..."
Is there an ISO standard for how to say, "I don't agree with a very specific aspect of your politics, or a specific statement one of your political heroes made, for a very specific reason, but I'm not declaring myself at the extreme horrible kitten-eating end of whatever political spectrum you live in."
“Policies that destroy the biosphere are discouraged.” — ISO-0000
Amen. Shout it from the rooftops!
Ohh, dashes.
...nah man, 27 february 2013 (or 2013 february 27 if you want to append 24.00 time) leave no room for ambiguity...
No hablo inglés y no sé cuál es "february". How about that? Only Arabic numbes survive internationally.
Disregard ISO8601. Acquire RFC3339. You can leave off the T if you want to, or replace Z with +00:00
.
with ISO 8601:
Sure, how about 2018-W06-1? Or 2018-036?
ISO 8601 contains way too many obscure formats. RFC 3339 is pretty much a subset and defines only sensible ones. It also allows 2018-02-05 08:02:43-00:00 (no T and explicitly specifying no timezone)
Acquiring the document (legally) to ensure compliance for ISO 8601 is relatively expensive for a single person (~$200 USD), while RFC 3339 is accessible for free.
10:13 PM on February 27th, but how do you write the year?
So, assuming you got the time wrong and meant you could confuse year and time of day, ISO also puts time after date.
2025-05-01T18:18:03Z
Which makes sense. Higher unit to lower unit.
10:13 would be 2213 ?
I'm a fool
10:13pm or 8:13pm? I can see how this is confusing… perhaps another cartoon with more guidance might be needed.
Personally I like date time groups: 272013 Feb 2013
Nothing irritates me more than the "01-May-25", "DD-Mon-YY" i.e. the way Oracle databases format dates by default.
Oh? It's my favorite. Almost no ambiguity at all.
From my reading, it's quite ambiguous. It could be 2025-05-01 or 2001-05-25.
DB2 has been using ISO dates by default for decades.
I see he paid the Internet Cat Tax
Fk it DD/MM/YYYY Makes much more sense
You normally use dates to keep track of a series of stuff for future reference. We read left to right.
Do you want to read 01 or 2013 first? Do you care about the day and month if it's from 13 years ago?
Relevance is made much more apparent in my opinion.
How do you write the number thirteen? 13 or 31? 🤔
I'm working in an international company with colleagues around the world. To avoid confusion, I switched to using this format:
27-FEB-2013
I deal with a lot of old records and boy I really prefer iso when you have to look at a lot of dates and things are in all different years, it's helpful. Have you tried ISO? I also do a lot of international work and haven't heard complaints about it being confusing.
I honestly prefer ISO, but as soon as a US colleague is involved, things get messy. That's my experience from the last 10 years or so.
This format can fuck off. I prefer the unambiguous format 2FEB2013.
Checkmate, date snobs.
And yes, nations are free to use their appropriate abbreviations for the months.
As long as the month comes before the day I can get behind it.
27.2.2013 is fine for handwriting on paper
For your example, maybe. If someone writes 8/3/2012, you don't know which is month/day. And if they shorten it to 08/03/12 you literally can't even conclusively determine the year, much less the month or day...
Which month is 27?
The one after the 26th.
Smarch2: Electric Boogaloo
That's what we Europeans call a "petty answer to the disgrace that is Amarican military time" (not the be confused with regular Amarican time and dates, which don't allow overflow, as far as I'm aware). The date described above is clearly "the second of March, 2015" or 2015-03-02.
5/1/2025. I'll die on this hill.
m/d/y, so wrong by default
5/1/5 ?
Oh please. What's next? A twelve hour time system with am and pm? Measuring distances in thumbs and other body parts?
I'll call the coroner.
Imagine a database, or even a folder with multiple years in it. "Payroll_05-01-2025". Now all your files are sorted by month. You would have to scroll through "Payroll_05-08-1988"... etc forever before you reach 2025. And when you do, all of 2025 isn't together. ISO 8601 solves these issues automatically. It's time to adapt to a better system...
I'll see you in hell.
Fifth January 2025?
The 5th January 2025, correct.