mirror of
https://github.com/araddon/dateparse.git
synced 2025-01-18 18:56:47 +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")
|
||||
} else if i == 4 {
|
||||
// gross
|
||||
datestr = datestr[0:i-1] + datestr[i+1:]
|
||||
datestr = datestr[0:i-1] + datestr[i:]
|
||||
return parseTime(datestr, loc)
|
||||
} else {
|
||||
return nil, unknownErr(datestr)
|
||||
|
@ -443,6 +443,7 @@ var testParseFormat = []dateTest{
|
||||
{in: "5,000-9,999", err: true},
|
||||
//
|
||||
{in: "oct 7, 1970", out: "Jan 2, 2006"},
|
||||
{in: "sept. 7, 1970", out: "Jan. 2, 2006"},
|
||||
// 03 February 2013
|
||||
{in: "03 February 2013", out: "02 January 2006"},
|
||||
// 13:31:51.999 -07:00 MST
|
||||
|
Loading…
Reference in New Issue
Block a user