2
0
mirror of https://github.com/araddon/dateparse.git synced 2026-07-17 21:50:48 +08:00

add new format for no seconds

This commit is contained in:
Aaron Raddon
2014-04-27 13:26:17 -07:00
parent bb9e1dcbca
commit 98484a1f48
2 changed files with 32 additions and 7 deletions

View File

@@ -65,6 +65,16 @@ func TestParse(t *testing.T) {
//u.Debug(ts.Unix(), ts)
assert.T(t, ts.Unix() == 1332151919)
ts, err = ParseAny("4/8/2014 22:05")
assert.T(t, err == nil)
//u.Debug(ts.Unix(), ts)
assert.T(t, ts.Unix() == 1396994700)
ts, err = ParseAny("04/08/2014 22:05")
assert.T(t, err == nil)
//u.Debug(ts.Unix(), ts)
assert.T(t, ts.Unix() == 1396994700)
// Unix Time Stamp
ts, err = ParseAny("1332151919")
assert.T(t, err == nil)