-
Notifications
You must be signed in to change notification settings - Fork 18k
affected/package: time #63843
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
Comments
I'm not sure if I follow along with the problem you are reporting, it seems that AddDate is working as intended. Can you clarify what you think the bug is and a clear way to reproduce it? Thanks |
@shaoqingyang maybe what is confusing you is the normalization of the date. |
Normalization is explicitly stated in the docs for AddDate. Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For questions please refer to https://github.com/golang/go/wiki/Questions |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Indeed, it is.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I need to calculate the date one month ago. If today is October 31st, the time calculated using the AddDate() method is October 1st, and the underlying code does not take into account the different days of each month.
I provide some code and hope to receive your modifications.
What did you expect to see?
I hope that future versions can consider my proposed issue.
What did you see instead?
The mistake of AddDate()
The text was updated successfully, but these errors were encountered: