mirror of
https://github.com/golang/go
synced 2024-11-19 20:54:39 -07:00
time: fix incorrect "zero pad" comment in example
The comment currently implies that a zero will be added, but the underscore is used to add a space for single-digit dates. Change-Id: Ib3bac8a16bc2d1fcb26ab3bb7ad172b89e1a4a24 Reviewed-on: https://go-review.googlesource.com/75230 Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
2dd110f9a7
commit
0d101d1a9f
@ -238,10 +238,10 @@ func ExampleTime_Format() {
|
||||
// value.
|
||||
do("No pad", "<2>", "<7>")
|
||||
|
||||
// An underscore represents a zero pad, if required.
|
||||
// An underscore represents a space pad, if the date only has one digit.
|
||||
do("Spaces", "<_2>", "< 7>")
|
||||
|
||||
// Similarly, a 0 indicates zero padding.
|
||||
// A "0" indicates zero padding for single-digit values.
|
||||
do("Zeros", "<02>", "<07>")
|
||||
|
||||
// If the value is already the right width, padding is not used.
|
||||
|
Loading…
Reference in New Issue
Block a user