aboutsummaryrefslogtreecommitdiff
path: root/src/time/format.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2016-11-02 17:19:42 -0400
committerRuss Cox <rsc@golang.org>2016-11-03 16:04:14 +0000
commit3345802e8ac39e4ea6b2772ace15983f2c3be66b (patch)
tree39df0337addea860dbe3c17bf3d4f803008393fe /src/time/format.go
parent1c08c728dceeb63f6df915831bd0584be1517e00 (diff)
downloadgo-3345802e8ac39e4ea6b2772ace15983f2c3be66b.tar.gz
go-3345802e8ac39e4ea6b2772ace15983f2c3be66b.zip
time: document that only Jan and January, Mon and Monday are recognized
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>
Diffstat (limited to 'src/time/format.go')
-rw-r--r--src/time/format.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/time/format.go b/src/time/format.go
index 0ad3cf64e4..3608b04e44 100644
--- a/src/time/format.go
+++ b/src/time/format.go
@@ -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.
//