Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time: documentation for layout strings is lacking #9689

Closed
TomOnTime opened this issue Jan 26, 2015 · 3 comments

Comments

Projects
None yet
6 participants
@TomOnTime
Copy link
Contributor

commented Jan 26, 2015

As documented in this hacker news thread:
https://news.ycombinator.com/item?id=8944578

"The Go date format is one my huge annoyances about the language (not generics, interface{} magic, or the lack of immutable types). My biggest issue is that despite the fact the designers call Strftime bad because no one remembers the letters, and has to have documentation handy - the Go docs don't even document the magic numbers you have to use.
Why 2006? How do I represent a day? When do I use _2 vs 2? Its very poorly documented and thankfully all I use is RFC3339 and Unix timestamps."

@adg

This comment has been minimized.

Copy link
Contributor

commented Jan 26, 2015

I just sent

https://go-review.googlesource.com/3302

On 26 January 2015 at 14:49, Tom Limoncelli notifications@github.com
wrote:

As documented in this hacker news thread:
https://news.ycombinator.com/item?id=8944578

"The Go date format is one my huge annoyances about the language (not
generics, interface{} magic, or the lack of immutable types). My biggest
issue is that despite the fact the designers call Strftime bad because no
one remembers the letters, and has to have documentation handy - the Go
docs don't even document the magic numbers you have to use.
Why 2006? How do I represent a day? When do I use _2 vs 2? Its very poorly
documented and thankfully all I use is RFC3339 and Unix timestamps."


Reply to this email directly or view it on GitHub
#9689.

@rsc rsc added this to the Go1.5Maybe milestone Apr 10, 2015

@robpike

This comment has been minimized.

Copy link
Contributor

commented Apr 11, 2015

Fixed. At tip there are now very nice examples and the docs refer to them.

http://tip.golang.org/pkg/time/#Time.Format now refers to http://tip.golang.org/pkg/time/#example_Time_Format which is all new

@robpike robpike closed this Apr 11, 2015

@mikioh mikioh modified the milestones: Go1.5, Go1.5Maybe Apr 12, 2015

@gopherbot

This comment has been minimized.

Copy link

commented May 6, 2015

CL https://golang.org/cl/9784 mentions this issue.

@golang golang locked and limited conversation to collaborators Jun 25, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.