Skip to content

time: wrong error message at parsing years #29916

@tredoe

Description

@tredoe

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 year-month "111-01" with layout "2006-01"

https://play.golang.org/p/maXaDx3GZ-V

What did you expect to see?

At the last part of the error i=2: cannot parse "111" as "2006"

What did you see instead?

cannot parse "01" as "2006"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions