Date, months are zero based, and days aren't.
var foo = new Date(2012, 1, 1)
produces February 1st 2012
Why is this?
Most likely the idea is, that the months are thought of as an index into an array of month names, while days are simply "counted".
|show 2 more comments|