+ 2
Isn't 'month ' upgraded in solo learn?
var d = new Date ; var month = d.getMonth() ; document.write(month) ; This is giving result as 6..
3 Antworten
+ 3
bro.......getMonth() value starts from 0
.....just like index in string or array.........
use d.getMonth()+1 to get accurate month.....
know more from here
https://stackoverflow.com/questions/18624326/getmonth-in-javascript-gives-last-month
+ 3
@chirag ghosh But yesterday I got the correct value......?
+ 2
And I am getting all the correct values for day and year but not for month... It has to be fixed