Skip to content

time: include const for time.Time.String()'s layout #6587

@gopherbot

Description

@gopherbot

by michael.schurter:

The layout used by the time.Time.String() method is hardcoded into the method. If it
were a constant it would be easier to roundtrip time.Time's through a string (or []byte)
without having to copy and paste the layout out of Time.String's docstring.

Relevant code: https://code.google.com/p/go/source/browse/src/pkg/time/format.go#397

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