From: Kirill Tatchihin Date: Thu, 23 Jan 2020 16:14:40 +0000 (+0000) Subject: time: document how Parse handles two-digit years X-Git-Tag: go1.14rc1~76 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=8453844ed774b0f864d28cb83844402c63db2849;p=gostls13.git time: document how Parse handles two-digit years Fixes #36549 Change-Id: Ia803330fc046d5807bbefd67acb419cb81640a13 GitHub-Last-Rev: bd354319083bf80c250e1915f2be6860d2f7d14b GitHub-Pull-Request: golang/go#36584 Reviewed-on: https://go-review.googlesource.com/c/go/+/214980 Reviewed-by: Rob Pike --- diff --git a/src/time/format.go b/src/time/format.go index b531cb4760..9beb5d9a48 100644 --- a/src/time/format.go +++ b/src/time/format.go @@ -792,6 +792,9 @@ func skip(value, prefix string) (string, error) { // Years must be in the range 0000..9999. The day of the week is checked // for syntax but it is otherwise ignored. // +// For layouts specifying the two-digit year 06, a value NN >= 69 will be treated +// as 19NN and a value NN < 69 will be treated as 20NN. +// // In the absence of a time zone indicator, Parse returns a time in UTC. // // When parsing a time with a zone offset like -0700, if the offset corresponds