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: misleading error message froms Parse for initial element missing leading zeroes #29918

Closed
tredoe opened this issue Jan 24, 2019 · 4 comments

Comments

Projects
None yet
4 participants
@tredoe
Copy link

commented Jan 24, 2019

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

$ go version
go version go1.11.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What did you do?

Parsing the month-day "1-03" with layout "01-02".
https://play.golang.org/p/7bfuFfjG7nJ

What did you expect to see?

At the last part of the error i=1: cannot parse "1" as "01"

What did you see instead?

month out of range

@bcmills bcmills changed the title time: wrong error message at parsing months time: Parse error message is incorrect for initial month missing leading zero Jan 29, 2019

@bcmills bcmills added the NeedsFix label Jan 29, 2019

@bcmills bcmills added this to the Go1.13 milestone Jan 29, 2019

@bcmills bcmills changed the title time: Parse error message is incorrect for initial month missing leading zero time: misleading error message from Parse for initial month missing leading zero Jan 29, 2019

@bcmills bcmills added the help wanted label Jan 29, 2019

@bcmills bcmills changed the title time: misleading error message from Parse for initial month missing leading zero time: misleading error message froms Parse for initial element missing leading zeroes Jan 29, 2019

@gopherbot

This comment has been minimized.

Copy link

commented Jan 30, 2019

Change https://golang.org/cl/160338 mentions this issue: time: fix misleading error for leading zero format

@gopherbot

This comment has been minimized.

Copy link

commented Jan 30, 2019

Change https://golang.org/cl/160479 mentions this issue: time: fix parsing issue for improper month value

@gopherbot

This comment has been minimized.

Copy link

commented Feb 21, 2019

Change https://golang.org/cl/163260 mentions this issue: time: fix parse month error message

@dmitshur dmitshur removed the help wanted label Feb 22, 2019

@dmitshur

This comment has been minimized.

Copy link
Member

commented Feb 22, 2019

It looks like there are 3 CLs open for review that are all trying to resolve this issue:

To make progress on this issue, those CLs should be reviewed.

@gopherbot gopherbot closed this in 8feeada Apr 26, 2019

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