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

Open
takeyourhatoff opened this issue Jan 14, 2020 · 2 comments · May be fixed by #36584
Open

time: Pivot year used when parsing two digit years is not documented. #36549

takeyourhatoff opened this issue Jan 14, 2020 · 2 comments · May be fixed by #36584

Comments

@takeyourhatoff
Copy link

@takeyourhatoff takeyourhatoff commented Jan 14, 2020

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

This comment has been minimized.

Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jan 14, 2020

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.

rbUUbr added a commit to rbUUbr/go that referenced this issue Jan 15, 2020
@rbUUbr rbUUbr linked a pull request that will close this issue Jan 15, 2020
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Jan 15, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.