2 ms·
That is the perfect moment to mention ISO 8601 and RFC 3339.
by alexvoda 4y ago
That is the perfect moment to mention ISO 8601 and RFC 3339.
- pooper 4y agoI started using 8601 without even thinking about it for one simple reason. Alphabetical sorting just works with YYYYmmdd So for example, log20220804.txt https://xkcd.com/1179/ https://xkcd.com/1179/ At the very least, use four digit years, not 22 for 2022. > ISO 8601 was published on 06/05/88 and most recently amended on 12/01/04.
- smdyc1 4y agoI've been using that format too for the same reason, without knowing about 8601. Day/Month/Year is great for a person (I'm in Aus) since we, as human beings, intrinsically know what year it is, and probably know what month it is if we haven't been on a bender. But string sorting is so much easier using yyyyMMdd format.
- sneak 4y agoyyyymmdd is incorrect, as pointed out explicitly in the xkcd you linked. The format is yyyy-mm-dd.