why day in Date() start from 2

67 Views Asked by At

why day must be start from 2 ?!?

new Date(2014,0,2).toJSON().slice(0,10)  // return: "2014-01-01"

new Date(2014,0,1).toJSON().slice(0,10)  // return: "2013-12-31"

my browser: Google Chrome, Version 23.0.1271.97

0

There are 0 best solutions below