Commit 0d101d1a authored by Blixt's avatar Blixt Committed by Tobias Klauser

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/75230Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 2dd110f9
...@@ -238,10 +238,10 @@ func ExampleTime_Format() { ...@@ -238,10 +238,10 @@ func ExampleTime_Format() {
// value. // value.
do("No pad", "<2>", "<7>") 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>") do("Spaces", "<_2>", "< 7>")
// Similarly, a 0 indicates zero padding. // A "0" indicates zero padding for single-digit values.
do("Zeros", "<02>", "<07>") do("Zeros", "<02>", "<07>")
// If the value is already the right width, padding is not used. // If the value is already the right width, padding is not used.
......
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