2
0
mirror of https://github.com/araddon/dateparse.git synced 2026-09-01 00:04:32 +08:00

Added fix to parse dates of the format 28-Feb-18 and 28-Feb-2018.

This commit is contained in:
Philippe Horne
2019-06-19 13:28:39 -04:00
parent d2ba70357e
commit dd780a39a3
2 changed files with 25 additions and 0 deletions

View File

@@ -213,6 +213,9 @@ var testInputs = []dateTest{
{in: "2014-04-02", out: "2014-04-02 00:00:00 +0000 UTC"},
{in: "2014-03-31", out: "2014-03-31 00:00:00 +0000 UTC"},
{in: "2014-4-2", out: "2014-04-02 00:00:00 +0000 UTC"},
// dd-mmm-yy
{in: "28-Feb-02", out: "2002-02-28 00:00:00 +0000 UTC"},
{in: "15-Jan-18", out: "2018-01-15 00:00:00 +0000 UTC"},
// yyyy-mm
{in: "2014-04", out: "2014-04-01 00:00:00 +0000 UTC"},
// yyyy-mm-dd hh:mm:ss AM