Skip to content

time: misleading error message froms Parse for initial element missing leading zeroes #29918

@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 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions