aboutsummaryrefslogtreecommitdiff
path: root/src/time/example_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-10-31 16:38:17 -0700
committerIan Lance Taylor <iant@golang.org>2017-11-01 00:30:39 +0000
commitfb1fd6aee6af655a54193d961d5f11ff16580e6a (patch)
tree07ba1e2398a34de2cc27aa12b830a69dde5f7f00 /src/time/example_test.go
parent6eb8076961310649ce02604edaec6d161d25c88f (diff)
downloadgo-fb1fd6aee6af655a54193d961d5f11ff16580e6a.tar.gz
go-fb1fd6aee6af655a54193d961d5f11ff16580e6a.zip
time: improve comments about valid layouts being invalid Parse values
Updates #9346 Updates #22135 Change-Id: I7039c9f7d49600e877e35b7255c341fea35890e2 Reviewed-on: https://go-review.googlesource.com/74890 Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/time/example_test.go')
-rw-r--r--src/time/example_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/time/example_test.go b/src/time/example_test.go
index 134aef3594..98a2d532a3 100644
--- a/src/time/example_test.go
+++ b/src/time/example_test.go
@@ -317,8 +317,8 @@ func ExampleParse() {
t, _ = time.Parse(shortForm, "2013-Feb-03")
fmt.Println(t)
- // Valid layouts may not be a valid time value, due to format specifiers
- // like _ for zero padding or Z for zone information.
+ // Some valid layouts are invalid time values, due to format specifiers
+ // such as _ for zero padding and Z for zone information.
// For example the RFC3339 layout 2006-01-02T15:04:05Z07:00
// contains both Z and a time zone offset in order to handle both valid options:
// 2006-01-02T15:04:05Z