function getNumberOfDaysInMonth(date) {
      return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate();
    }
Gets the number of days in the month for the given date's month.
@param date
@returns {number}