var d = new Date(2011,1,1); alert(d);
this alert says February, while it should say January
anybody has some explanation for that ?
JavaScripts Date object zero-indexes months.
Try:
var d = new Date(2011,0,1); alert(d);
Instead.
See the documentation for more info!
1.4m articles
1.4m replys
5 comments
57.0k users