mirror of
https://github.com/araddon/dateparse.git
synced 2024-11-10 11:51:54 +08:00
Add unit test for format for #62
This commit is contained in:
parent
b703960732
commit
089f77b1d9
@ -720,7 +720,7 @@ iterRunes:
|
|||||||
p.set(0, "Jan")
|
p.set(0, "Jan")
|
||||||
} else if i == 4 {
|
} else if i == 4 {
|
||||||
// gross
|
// gross
|
||||||
datestr = datestr[0:i-1] + datestr[i+1:]
|
datestr = datestr[0:i-1] + datestr[i:]
|
||||||
return parseTime(datestr, loc)
|
return parseTime(datestr, loc)
|
||||||
} else {
|
} else {
|
||||||
return nil, unknownErr(datestr)
|
return nil, unknownErr(datestr)
|
||||||
|
@ -443,6 +443,7 @@ var testParseFormat = []dateTest{
|
|||||||
{in: "5,000-9,999", err: true},
|
{in: "5,000-9,999", err: true},
|
||||||
//
|
//
|
||||||
{in: "oct 7, 1970", out: "Jan 2, 2006"},
|
{in: "oct 7, 1970", out: "Jan 2, 2006"},
|
||||||
|
{in: "sept. 7, 1970", out: "Jan. 2, 2006"},
|
||||||
// 03 February 2013
|
// 03 February 2013
|
||||||
{in: "03 February 2013", out: "02 January 2006"},
|
{in: "03 February 2013", out: "02 January 2006"},
|
||||||
// 13:31:51.999 -07:00 MST
|
// 13:31:51.999 -07:00 MST
|
||||||
|
Loading…
Reference in New Issue
Block a user