1
0
Fork 0

Add workaround for parsing an invalid date

This commit is contained in:
Frédéric Guillot 2020-09-14 21:23:26 -07:00
parent ad66250734
commit bfb96d536e
2 changed files with 2 additions and 0 deletions

View file

@ -156,6 +156,7 @@ var dateFormats = []string{
"2006-01-02T15:04:05 -0700",
"2006-01-02T15:04:05:00",
"2006-01-02T15:04:05",
"2006-01-02T15:04",
"2006-01-02 at 15:04:05",
"2006-01-02 15:04:05Z",
"2006-01-02 15:04:05 MST",

View file

@ -132,6 +132,7 @@ func TestParseWeirdDateFormat(t *testing.T) {
"March 30 2020 07:02:38 PM",
"Mon, 30 Mar 2020 19:53 +0000",
"Mon, 03/30/2020 - 19:19",
"2018-12-12T12:12",
}
for _, date := range dates {