14
rated 0 times
[
20]
[
6]
/ answers: 1 / hits: 120164
/ 11 Years ago, wed, september 4, 2013, 12:00:00
I am using a datepicker which gives a date in the format Sun Jul 7 00:00:00 EDT 2013.
Even though the month says July, if I do a getMonth, it gives me the previous month.
var d1 = new Date(Sun Jul 7 00:00:00 EDT 2013);
d1.getMonth());//gives 6 instead of 7
What am I doing wrong?
More From » date