Returns the number of days in the month that contains the CalculationDate.

var date = now.valueOf('2016-02-22'); // February

console.log('Days in the month = %s', date.daysInTheMonth());

//Days in the month = 28
Did this answer your question?