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

Comments

Projects
None yet
3 participants
@toxeus
Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Dec 31, 2015

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.
You can’t perform that action at this time.