2025-02-21
• no tags • 220 words
I have used, for a good while now (probably coming up to two years), ISO-8601 whenever I need to represent dates. Well, technically not, because ISO-8601 requires the T to be used when representing times, so I guess I use something like RFC 3339 instead, or maybe just more generically "the %Y-%m-%d %H:%M format", but either way.
There are some very obvious benefits, like the ordering of files being automatically done correctly, and not having to be confused about whether 02/01/2024 is January 2nd (UK) or 1st February (US). An old system we used at work would represent dates in the US format, and it caused all sorts of trouble when UK dates would get interpreted as being in US format or vice versa, and just made it difficult to read. YYYY-MM-DD format is easy to read for just about everybody, and solves so many issues.
I even use it though, when I'm just writing notes in my notepad. I start each journal day off with a line with the date, in YYYY-MM-DD format. I think I may have started to do it as I began to learn Japanese (which gives the date in a very similar format, but prefixes the kanji for year, month and day before each part).
It's such a good standard, and I really wish the entire world could just agree to use it for everything!