Skip to content

Comment on Go Date Format

Comments

I generally agree with Cox but "no one remembers all the letters, so the only way to use it is with documentation in hand."

Huh?

Who can remember the numbers? The only way to use this format is with the documentation.

It is an easier to read and verify format. However if you think a casual user will remember that "02" is hour and "03" is... wait, is 02 hour? Let me check the documentation.

While it seems random, it is simply:

1 2 3 4 5 6 => January, 2, 03:04:05pm, 2006

It's 1,2,3,4,5,6 in the default format of the posix 'date' command.

And 7 is the TZ (-0700)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.