]> Cypherpunks repositories - gostls13.git/commitdiff
time: document that only Jan and January, Mon and Monday are recognized
authorRuss Cox <rsc@golang.org>
Wed, 2 Nov 2016 21:19:42 +0000 (17:19 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 3 Nov 2016 16:04:14 +0000 (16:04 +0000)
Not "J", not "JAN", not "jan", etc.

Fixes #17523.

Change-Id: I16b5da97e73d88c6680c36401d30f8a195061527
Reviewed-on: https://go-review.googlesource.com/32636
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
src/time/format.go

index 0ad3cf64e4f9f78837839e81434120f96e1a68b8..3608b04e445714fc2c16c633cbd47261a5b159c4 100644 (file)
@@ -42,6 +42,13 @@ import "errors"
 //     Z07:00 Z or ±hh:mm
 //     Z07    Z or ±hh
 //
+// The recognized day of week formats are "Mon" and "Monday".
+// The recognized month formats are "Jan" and "January".
+//
+// Text in the format string that is not recognized as part of the reference
+// time is echoed verbatim during Format and expected to appear verbatim
+// in the input to Parse.
+//
 // The executable example for time.Format demonstrates the working
 // of the layout string in detail and is a good reference.
 //