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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user