+ 1
Hey!! I have come up with a problem in java script date method.
According to this code~ var n=new Date(); var month = n.getMonth(); document.write(month); The output should be 03(for now as it is March) but it is showing 02. Please help me out.
2 Respuestas
+ 6
I do believe it starts from 0. (so january is 0, december would be 11)
so just add 1 before outputting it
+ 2
Thanks..