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
Closed

time: documentation for layout strings is lacking #9689

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

Comments

@TomOnTime
Copy link
Contributor

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
Copy link
Contributor

adg 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
Copy link
Contributor

robpike 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 as completed Apr 11, 2015
@mikioh mikioh modified the milestones: Go1.5, Go1.5Maybe Apr 12, 2015
@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants