mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
[release-branch.go1.17] time: fix docs for new comma layouts
The current text is slightly inaccurate. Make it more correct. Change-Id: Iebe0051b74649d13982d7eefe3697f9e69c9b75d Reviewed-on: https://go-review.googlesource.com/c/go/+/340449 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-on: https://go-review.googlesource.com/c/go/+/341949 Trust: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
eb5a7b5050
commit
4397d66bdd
@ -753,9 +753,9 @@ func Foo() bool {
|
|||||||
|
|
||||||
<p><!-- CL 311572 -->
|
<p><!-- CL 311572 -->
|
||||||
The new
|
The new
|
||||||
<a href="/pkg/database/sql/#NullInt16"><code>NullInt16</code></a>
|
<a href="/pkg/database/sql/#NullInt16"><code>NullInt16</code></a>
|
||||||
and
|
and
|
||||||
<a href="/pkg/database/sql/#NullByte"><code>NullByte</code></a>
|
<a href="/pkg/database/sql/#NullByte"><code>NullByte</code></a>
|
||||||
structs represent the int16 and byte values that may be null. These can be used as
|
structs represent the int16 and byte values that may be null. These can be used as
|
||||||
destinations of the <a href="/pkg/database/sql/#Scan"><code>Scan</code></a> method,
|
destinations of the <a href="/pkg/database/sql/#Scan"><code>Scan</code></a> method,
|
||||||
similar to NullString.
|
similar to NullString.
|
||||||
@ -1205,11 +1205,11 @@ func Foo() bool {
|
|||||||
|
|
||||||
<p><!-- CL 300996 -->
|
<p><!-- CL 300996 -->
|
||||||
The package now accepts comma "," as a separator for fractional seconds when parsing and formatting time.
|
The package now accepts comma "," as a separator for fractional seconds when parsing and formatting time.
|
||||||
The following time formats are now accepted:
|
For example, the following time layouts are now accepted:
|
||||||
<ul>
|
<ul>
|
||||||
<li>2006-01-02 14:06:03,999999999 -0700 MST</li>
|
<li>2006-01-02 15:04:05,999999999 -0700 MST</li>
|
||||||
<li>Mon Jan _2 14:06:03,120007 2006</li>
|
<li>Mon Jan _2 15:04:05,000000 2006</li>
|
||||||
<li>Mon Jan 2 14:06:03,120007 2006</li>
|
<li>Monday, January 2 15:04:05,000 2006</li>
|
||||||
</ul>
|
</ul>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -77,9 +77,9 @@ import "errors"
|
|||||||
// The formats and 002 are space-padded and zero-padded
|
// The formats and 002 are space-padded and zero-padded
|
||||||
// three-character day of year; there is no unpadded day of year format.
|
// three-character day of year; there is no unpadded day of year format.
|
||||||
//
|
//
|
||||||
// A decimal point followed by one or more zeros represents a fractional
|
// A comma or decimal point followed by one or more zeros represents
|
||||||
// second, printed to the given number of decimal places.
|
// a fractional second, printed to the given number of decimal places.
|
||||||
// Either a comma or decimal point followed by one or more nines represents
|
// A comma or decimal point followed by one or more nines represents
|
||||||
// a fractional second, printed to the given number of decimal places, with
|
// a fractional second, printed to the given number of decimal places, with
|
||||||
// trailing zeros removed.
|
// trailing zeros removed.
|
||||||
// For example "15:04:05,000" or "15:04:05.000" formats or parses with
|
// For example "15:04:05,000" or "15:04:05.000" formats or parses with
|
||||||
|
Loading…
x
Reference in New Issue
Block a user