2
0
mirror of https://github.com/araddon/dateparse.git synced 2026-07-08 05:01:31 +08:00

-add date only format

This commit is contained in:
Aaron Raddon
2014-04-27 14:33:33 -07:00
parent 98484a1f48
commit a2c6f47ce0
2 changed files with 16 additions and 2 deletions

View File

@@ -75,10 +75,15 @@ func TestParse(t *testing.T) {
//u.Debug(ts.Unix(), ts)
assert.T(t, ts.Unix() == 1396994700)
ts, err = ParseAny("3/31/2014")
assert.T(t, err == nil)
//u.Debug(ts.Unix(), ts)
assert.T(t, ts.Unix() == 1396224000)
// Unix Time Stamp
ts, err = ParseAny("1332151919")
assert.T(t, err == nil)
u.Debug(ts.Unix(), ts)
//u.Debug(ts.Unix(), ts)
assert.T(t, ts.Unix() == 1332151919)
ts2, err := ParseAny("2009-08-12T22:15:09-07:00")