My local time zone is (UTC+06:00) Dhaka
. In my own time zone I didn't find this problem. But changing the time zone to (UTC -12:00) International Date Line West
in my pc,
new Date(["2014","01","01"])
is giving me output Wed Jan 01 2014 00:00:00 GMT-1200 (GMT-12:00)
.
new Date("2014-01-01")
is giving me output Tue Dec 31 2013 12:00:00 GMT-1200 (GMT-12:00)
.
Why this is happening?
Shouldn't ["2014","01","01"]
and "2014-01-01"
suppose to give same output?