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: Pivot year used when parsing two digit years is not documented. #36549

Closed
takeyourhatoff opened this issue Jan 14, 2020 · 2 comments
Closed
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@takeyourhatoff
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.13.3 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

Try to parse dates with two digit years.
https://play.golang.org/p/CdUxdDqG8mF

What did you expect to see?

Documentation regarding the pivot year used when parsing two digit years.

What did you see instead?

No mention of the pivot year used.

@ianlancetaylor ianlancetaylor added help wanted NeedsFix The path to resolution is known, but the work has not been done. labels Jan 14, 2020
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Jan 14, 2020
@ianlancetaylor
Copy link
Contributor

The pivot year is 1969 (two-digit-year >= 69 => add 1900, < 69 => add 2000). I agree that this should be documented somewhere, perhaps in the doc comment for time.Parse.

@gopherbot
Copy link

Change https://golang.org/cl/214980 mentions this issue: Update documentation(#36549)

@golang golang locked and limited conversation to collaborators Jan 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants