5 ms·
If you ask "Why 2006?" then you missed the point. Mon Jan 2 15:04:05 -0700 MST 2006 0 1 2 3 4 5 6 How to represent a day? "2". Wan
by enneff 12y ago
If you ask "Why 2006?" then you missed the point.
Mon Jan 2 15:04:05 -0700 MST 2006
0 1 2 3 4 5 6
How to represent a day? "2". Want a leading zero? "02".
- nemothekid 12y agoAgain, 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.
- tedunangst 12y agoIt's in the documentation right where you'd expect it to be. http://golang.org/pkg/time/#pkg-constants http://golang.org/pkg/time/#pkg-constants
- jerf 12y agoHere, directly below the actual listing of the constants: http://golang.org/pkg/time/#pkg-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.
- enneff 12y agoIt's in the documentation for the Format method, which is where I'd expect to find it: http://golang.org/pkg/time/#Time.Format 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.