mirror of
https://github.com/robertkrimen/otto
synced 2025-10-26 20:28:49 +08:00
Use new date adjustment technique
This commit is contained in:
@@ -579,6 +579,7 @@ func TestDate(t *testing.T) {
|
||||
test(`new Date(2009, 9, 25).toString()`, "Sun, 25 Oct 2009 00:00:00 UTC")
|
||||
test(`+(new Date(2009, 9, 25))`, "1.2564288e+12")
|
||||
|
||||
test(`abc = new Date(12564504e5); abc.setMilliseconds(2001); abc.toString()`, "Sun, 25 Oct 2009 06:00:02 UTC")
|
||||
test(`abc = new Date(12564504e5); abc.setMonth(9); abc.toString()`, "Sun, 25 Oct 2009 06:00:00 UTC")
|
||||
test(`abc = new Date(12564504e5); abc.setMonth("09"); abc.toString()`, "Sun, 25 Oct 2009 06:00:00 UTC")
|
||||
test(`abc = new Date(12564504e5); abc.setMonth("10"); abc.toString()`, "Wed, 25 Nov 2009 07:00:00 UTC")
|
||||
|
||||
Reference in New Issue
Block a user