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: unexpected behavior for time.AddDate() #13790

Closed
toxeus opened this issue Dec 31, 2015 · 1 comment
Closed

time: unexpected behavior for time.AddDate() #13790

toxeus opened this issue Dec 31, 2015 · 1 comment

Comments

@toxeus
Copy link

toxeus commented Dec 31, 2015

It seems like time.AddDate() is not correctly handling the number of days per month. This sometimes leads to unexpected behavior for time.AddDate() that can be best illustrated with a short code snippet:
http://play.golang.org/p/BS3tHHRxoA

@ianlancetaylor
Copy link
Contributor

This is working as documented. There is no September 31 or November 31, so the date is normalized.

@golang golang locked and limited conversation to collaborators Jan 4, 2017
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

3 participants