+ 12
Problem with code
There is problem that my code shows the month of November not December https://code.sololearn.com/W5825qK13Kcj/?ref=app
1 Respuesta
+ 5
The `getMonth` method of a Date object returns a zero based value indicating the month. That is, 0 for January, 1 for February, and so on.
To get passed it, just add one to <mon> variable value
var mon = d.getMonth() + 1;
https://www.w3schools.com/jsref/jsref_getmonth.asp