Skip to content

Commit 0583fb6

Browse files
committed
Adding tests for several combinations that are failing to parse
1 parent 6b43995 commit 0583fb6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

parseany_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,14 @@ var testInputs = []dateTest{
417417
{in: "1384216367111", out: "2013-11-12 00:32:47.111 +0000 UTC"},
418418
{in: "1384216367111222", out: "2013-11-12 00:32:47.111222 +0000 UTC"},
419419
{in: "1384216367111222333", out: "2013-11-12 00:32:47.111222333 +0000 UTC"},
420+
421+
// Potential bugs
422+
{in: "2014.02.13", out: "2014-02-13 00:00:00 +0000 UTC"}, // OK: baseline for comparison
423+
{in: "2014-02-13 00:00:00", out: "2014-02-13 00:00:00 +0000 UTC"}, // OK: parsed as expected
424+
{in: "2014-02-13 00:00:00 utc", out: "2014-02-13 00:00:00 +0000 UTC"}, // BUG?: Looks like lowercase timezones are not supported (cannot parse "utc" as "MST")
425+
{in: "2014.02.13 00:00:00", out: "2014-02-13 00:00:00 +0000 UTC"}, // BUG?: cannot be parsed (error is "month out of range")
426+
{in: "2014-02-13t00:00:00.0z", out: "2014-02-13 00:00:00 +0000 UTC"}, // BUG?: cannot be parsed (error is "month out of range")
427+
420428
}
421429

422430
func TestParse(t *testing.T) {

0 commit comments

Comments
 (0)