Skip to content

Comment on Go Date Formatparent

Comments

Again, where in the documentation is this listed? Why is the timezone 7 even though its before the year? Did you just make this up? It seems to me that this might just be a happy coincidence in the way you ordered the date.

Here, directly below the actual listing of the constants: http://golang.org/pkg/time/#pkg-constants

But I would also observe I missed this documentation myself a couple of times, and I think it probably should have gone on the package documentation, so while I'm linking you to this, I'm not necessarily disagreeing that it's misplaced a bit.

It's in the documentation right where you'd expect it to be. http://golang.org/pkg/time/#pkg-constants

It's in the documentation for the Format method, which is where I'd expect to find it:

http://golang.org/pkg/time/#Time.Format

That it's in order is an intentional mnemonic. I'm not sure why the 7 comes later, but appears earlier.

AboutSource Built by g1lg1l

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