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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With