End The Persistence of Bad Date Formats!
Top among my pet peeves as both programmer and general human is date formatting. Having lived through the nonpocalypse of Y2K (because we fixed lots of crap before it broke), ambiguous dates are anathema to me. I’ve never written a two-digit year since then except when an electronic form gives me no choice. I hope there is a special place in Hell for people who design forms like that.
The American date format of MM/DD/YYYY is another bad idea inherently but especially if you work in an international setting. The European format of DD/MM/YYYY is a bit more sensible since DD < MM < YYYY. When you confront a date formatted as XX/YY/ZZZZ, you have to think about it. If the day is 12 or less, you cannot tell just by looking if a date is in the US format or the European format, and even if the day is 13 or greater, you still had to think about it for a second.
Today I Found Out tries to explain why we Americans use this odd format, and it saddens a Philadelphian like myself to say that the Founding Fathers may be to blame:
But, friends, there is a better way: ISO-8601. I’m sure you’ve seen the short format: YYYY-MM-DD. I use one of the ISO formats whenever I have a free-form text box (paper or electronic) and whenever I include a date as part of a folder or file name. Other people may not be used to the format, but they rarely comment or have to ask me “Which part is the month, and which part is the day?”
ISO-8601 is unambiguous, it sorts correctly because it’s Big-Endian like out entire number system, and it’s what you should resolve to use wherever possible for 2019. It’s also not much work, so you should be able to stick to this one long after you’ve stopped going to the gym or started swearing at the TV again.