3 ms·
OK, I'm not a Go programmer so was struggling to figure out what was going on, until reading that the "canonical" date for formatting is essentially: 01/02 03:
by hn_throwaway_99 5y ago
OK, I'm not a Go programmer so was struggling to figure out what was going on, until reading that the "canonical" date for formatting is essentially:
01/02 03:04:05PM '06 -0700
I actually think that's a really good idea. Sure, it may easier to remember "YYYY-MM-DD" than "2006-01-02" at first, but I think it helps a lot in many other cases, e.g. you don't need to remember what is exactly meant by MM and MMM and MMMM, you could just create your format string as "January 2, 2006" or "Jan 2, 2006".
- tdeck 5y agoNever realized that, I guess because nobody writes timestamps in "month, day, time, year, zone offset" order.