Commit d3fb02b5 authored by Rob Pike's avatar Rob Pike

time: make it clearer that the reference time is the reference time.

Because the reference time is the reference time but beginners seem
to think otherwise, make it clearer you can't choose the reference time.

LGTM=josharian, dave
R=golang-codereviews, josharian, dave
CC=golang-codereviews
https://golang.org/cl/117250044
parent 30fbcc75
......@@ -7,7 +7,7 @@ package time
import "errors"
// These are predefined layouts for use in Time.Format and Time.Parse.
// The reference time used in the layouts is:
// The reference time used in the layouts is the specific time:
// Mon Jan 2 15:04:05 MST 2006
// which is Unix time 1136239445. Since MST is GMT-0700,
// the reference time can be thought of as
......@@ -402,7 +402,7 @@ func (t Time) String() string {
// Format returns a textual representation of the time value formatted
// according to layout, which defines the format by showing how the reference
// time,
// time, defined to be
// Mon Jan 2 15:04:05 -0700 MST 2006
// would be displayed if it were the value; it serves as an example of the
// desired output. The same display rules will then be applied to the time
......@@ -676,6 +676,7 @@ func skip(value, prefix string) (string, error) {
// Parse parses a formatted string and returns the time value it represents.
// The layout defines the format by showing how the reference time,
// defined to be
// Mon Jan 2 15:04:05 -0700 MST 2006
// would be interpreted if it were the value; it serves as an example of
// the input format. The same interpretation will then be made to the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment