Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
time: clean up MarshalJSON + support xml #2793
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.