I have got a problem with converting Saturday, 24th December 2016 to 24/12/2016 but having a problem. My code is:
var fullDate = new Date("Saturday, 24th December 2016");
console.log(fullDate);
var twoDigitMonth = ((fullDate.getMonth().length+1) === 1)? (fullDate.getMonth()+1) : '0' + (fullDate.getMonth()+1);
console.log(twoDigitMonth);
Can anyone help me?