Get month in mm format in javascript
An alternative way:
var currentMonth=('0'+(currentDate.getMonth()+1)).slice(-2)
if (currentMonth < 10) { currentMonth = '0' + currentMonth; }
An alternative way:
var currentMonth=('0'+(currentDate.getMonth()+1)).slice(-2)
if (currentMonth < 10) { currentMonth = '0' + currentMonth; }