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

Improve Add() and Sub() funcs for types.Time #32937

Closed
Defined2014 opened this issue Mar 9, 2022 · 1 comment
Closed

Improve Add() and Sub() funcs for types.Time #32937

Defined2014 opened this issue Mar 9, 2022 · 1 comment
Assignees
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@Defined2014
Copy link
Contributor

Enhancement

There are two problems with those two funcs in types.Time

  • The params and return type for those two funcs are inconsistent
  • The sub() func will cause overflow without error when diff between two Times over than 290 years.

related issue #31868

@Defined2014
Copy link
Contributor Author

Compare with golang's implementations, I think it's acceptable, so close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant