Skip to content

time: doc: be more explicit about how the reference date works #45830

@earthboundkid

Description

@earthboundkid

It seems like the reference date, being a novel idea in Go's time package, is a stumbling block for developers new to Go. I think it's worth adding a paragraph to the documentation for Parse and Format that is extremely explicit. Something along the lines of:

The following values are recognized:

month: 1 01 Jan January
day: 2 02 _2
hour: 3 03 15
minute: 4 04
second: 5 05 05.0 (etc.)
year: 6 06 2006
timezone: -07 -0700 -07:00 MST
day of week: Mon Monday
meridiem: pm PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions