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: Parse ignores weekday #11303

Closed
awly opened this issue Jun 19, 2015 · 2 comments

Comments

Projects
None yet
4 participants
@awly
Copy link
Contributor

commented Jun 19, 2015

What version of Go are you using (go version)?
go version go1.4.2 darwin/amd64

What did you do?
http://play.golang.org/p/h19M_zGLtU

What did you expect to see?
Wed Jan 5 00:00:00 0000
error: conflicting day of month and weekday

What did you see instead?
Sat Jan 1 00:00:00 0000
Sun Jan 2 00:00:00 0000

Seems like time.Parse simply ignores weekday value and only looks at day of month.
Simply updating the docs to reflect this should be enough.

@ianlancetaylor ianlancetaylor added this to the Go1.5Maybe milestone Jun 19, 2015

@robpike

This comment has been minimized.

Copy link
Contributor

commented Jun 20, 2015

The documentation for time.Parse already says, "The day of the week is checked for syntax but it is otherwise ignored." It seems clear enough.

@robpike robpike closed this Jun 20, 2015

@awly

This comment has been minimized.

Copy link
Contributor Author

commented Jun 20, 2015

Not sure how i missed that, apologies.

@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.