]> Cypherpunks repositories - gostls13.git/commitdiff
time: fix incorrect "zero padding" comments
authorKenny Grant <kennygrant@gmail.com>
Thu, 2 Nov 2017 12:35:25 +0000 (12:35 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 2 Nov 2017 17:16:37 +0000 (17:16 +0000)
The comment on invalid time values in Constants and example
refers to _ zero padding when it should refer to space padding.

Change-Id: I5784356e389d324703e20eec6203f147db92880f
Reviewed-on: https://go-review.googlesource.com/75410
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/time/example_test.go
src/time/format.go

index 34df8daef2ca9d7bcba18987c91201a7abe8c33a..1507f3f17528ab88ca6f3f8d8aa144bd284758fa 100644 (file)
@@ -318,7 +318,7 @@ func ExampleParse() {
        fmt.Println(t)
 
        // Some valid layouts are invalid time values, due to format specifiers
-       // such as _ for zero padding and Z for zone information.
+       // such as _ for space 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
index d964f4ab75d075550fc8bdec33265f708025a6e3..a60474f02684bc7c260a8483b739ab3a5ef489fb 100644 (file)
@@ -19,7 +19,7 @@ import "errors"
 // the same transformation to a general time value.
 //
 // Some valid layouts are invalid time values for time.Parse, due to formats
-// such as _ for zero padding and Z for zone information.
+// such as _ for space padding and Z for zone information.
 //
 // Within the format string, an underscore _ represents a space that may be
 // replaced by a digit if the following number (a day) has two digits; for