ISO Dates
Date and time notation have always been a sort of weird thing for humanity. It’s kinda funny how over in America people write dates as MM/DD/YY
or MM/DD/YYYY
; it’s sort of arbitrary why you’d put the month before the day. At least the people in the UK sort of got it right writing DD/MM/YYYY
. That isn’t perfectly unambiguous though, since sometimes days or months can be written with one digit instead of two for single digits, years are sometimes shortened to two digits instead of four, and slashes (/) aren’t the only way of seperating terms. While this might be ok for us humans since we are extremely good at inferring stuff, computers are the exact opposite of that and all this becomes a massive headache for programmers having to account for all the edge cases.
Evidently a lot of other people though this too and while various other time standards were made by ISO, including ISO 2014 which documented the most-to-least-significant date format, ISO 8601 merged all of them into one standard in 1988. It’s really simple, just YYYY-MM-DD
, 2006-01-02
. Months and days with single digits have to be padded with leading zeros, like with 24 hour time (01:00 or 0100). It’s wonderfully simple and allows for some cool stuff, like being able to sort files by date simply by putting the date in front of the filename.
The standard also allows for times to be notated too, though it is way more confusing. There are two ways of writing times, basic format T130102
, and extended T13:01:02
. Times use 24 hour time and must be padded with 0s. If you don’t to be as precise, you can use just T[HH][MM]
or even just T[HH]
. The T can be omitted in extended format, but you’re not really supposed to ignore the T in basic format unless you’re sure it won’t be confused with a date. There are also ways of writing time zones with the time and combining dates and times, but if you’re interested in that, I recommend the wikipedia page on the format (you can read the latest revision of the standard itself from 2019, but you need to pay almost $200 for it).
Dates in person aren’t so bad since you can infer based on the location, but chatting online removes a lot of context and when someone sends me 01/02/24, I have no idea if their American and that’s the 2nd of January, or if they’re sane and that’s the 1st of Febuary. Writing out dates in full is obviously impractical, so I think we all start using iso date formats, and if it doesn’t catch on mainstream, at least we can have some sort of inner circle type thing where IYKYK.