Skip to content

time: clean up MarshalJSON + support xml #2793

@rsc

Description

@rsc
1. Format should produce years that are at least 4 digits.
2. The year-padding code in MarshalJSON should go away.
3. The bulk of the MarshalJSON function (all except the "s)
    should be pulled into t.RFC3339().
4. MarshalJSON just calls RFC3339 and then adds quotes.
5. package xml should recognize time.Time and call RFC3339
   to get a representation/call time.Parse(time.RFC3339) to
   parse a representation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions