]> Cypherpunks repositories - gostls13.git/commit
time: improve Truncate and Round documentation
authorQuentin Smith <quentin@golang.org>
Wed, 7 Sep 2016 22:07:45 +0000 (18:07 -0400)
committerQuentin Smith <quentin@golang.org>
Mon, 12 Sep 2016 22:07:17 +0000 (22:07 +0000)
commite42ae65a85079a9f39d0fb4837a78172ad898d84
treec44ec6b6c536ec5cebf7ae28e5463e9e5c237832
parent1ee544641450236e8c78d8d408e6cb8ab69cee60
time: improve Truncate and Round documentation

Truncate and Round operate on absolute time, which means that
Truncate(Hour) may return a time with non-zero Minute(). Document that
more clearly, and remove the misleading example which suggests it is
safe.

Updates #16647

Change-Id: I930584ca030dd12849195d45e49ed2fb74e0c9ac
Reviewed-on: https://go-review.googlesource.com/28730
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/time/example_test.go
src/time/time.go