mirror of
https://github.com/araddon/dateparse.git
synced 2026-02-01 21:57:50 +00:00
Code cleanup, remove un-used code after #103
This commit is contained in:
@@ -11,8 +11,8 @@ import (
|
||||
func TestOne(t *testing.T) {
|
||||
time.Local = time.UTC
|
||||
var ts time.Time
|
||||
ts = MustParse("2018.09.30")
|
||||
assert.Equal(t, "2018-09-30 00:00:00 +0000 UTC", fmt.Sprintf("%v", ts.In(time.UTC)))
|
||||
ts = MustParse("Mon 30 Sep 2018 09:09:09 PM UTC")
|
||||
assert.Equal(t, "2018-09-30 21:09:09 +0000 UTC", fmt.Sprintf("%v", ts.In(time.UTC)))
|
||||
}
|
||||
|
||||
type dateTest struct {
|
||||
@@ -42,10 +42,11 @@ var testInputs = []dateTest{
|
||||
{in: "7 September 1970", out: "1970-09-07 00:00:00 +0000 UTC"},
|
||||
// ANSIC = "Mon Jan _2 15:04:05 2006"
|
||||
{in: "Mon Jan 2 15:04:05 2006", out: "2006-01-02 15:04:05 +0000 UTC"},
|
||||
// ANSIC_GLIBC = "Mon 02 Jan 2006 03:04:05 PM UTC"
|
||||
{in: "Mon 02 Jan 2006 03:04:05 PM UTC", out: "2006-01-02 15:04:05 +0000 UTC"},
|
||||
{in: "Thu May 8 17:57:51 2009", out: "2009-05-08 17:57:51 +0000 UTC"},
|
||||
{in: "Thu May 8 17:57:51 2009", out: "2009-05-08 17:57:51 +0000 UTC"},
|
||||
// ANSIC_GLIBC = "Mon 02 Jan 2006 03:04:05 PM UTC"
|
||||
{in: "Mon 02 Jan 2006 03:04:05 PM UTC", out: "2006-01-02 15:04:05 +0000 UTC"},
|
||||
{in: "Mon 30 Sep 2018 09:09:09 PM UTC", out: "2018-09-30 21:09:09 +0000 UTC"},
|
||||
// RubyDate = "Mon Jan 02 15:04:05 -0700 2006"
|
||||
{in: "Mon Jan 02 15:04:05 -0700 2006", out: "2006-01-02 22:04:05 +0000 UTC"},
|
||||
{in: "Thu May 08 11:57:51 -0700 2009", out: "2009-05-08 18:57:51 +0000 UTC"},
|
||||
|
||||
Reference in New Issue
Block a user