JavaScript: Return the number of days in a month
function daysInMonth(iMonth, iYear) { return new Date(iYear, iMonth, 0).getDate(); }