Javascript returns month as 9 where 10
I am creating today date using onclick event in JavaScript. When I set the .value property with:
var now = new Date;
...Value = now.getMonth() + "/" + now.getDate() + "/" + now.getYear();
this gives: 9/9/2009 I expect: 10/9/2009
This happens in both IE and Firefox. The system time on my computer is correct. Any ideas?
+2
source to share