Fix date lexer to only support 4-digit year (#443)

Fixes #441
This commit is contained in:
Cameron Moore
2020-09-12 17:04:04 -05:00
committed by GitHub
parent 65ca806488
commit a7448fe8de
2 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -788,7 +788,7 @@ func init() {
// 1979-05-27
// 07:32:00
// 00:32:00.999999
dateRegexp = regexp.MustCompile(`^(?:\d{1,4}-\d{2}-\d{2})?(?:[T ]?\d{2}:\d{2}:\d{2}(\.\d{1,9})?(Z|[+-]\d{2}:\d{2})?)?`)
dateRegexp = regexp.MustCompile(`^(?:\d{4}-\d{2}-\d{2})?(?:[T ]?\d{2}:\d{2}:\d{2}(\.\d{1,9})?(Z|[+-]\d{2}:\d{2})?)?`)
}
// Entry point