//某年某月最后一天
function getLastDay(year, month) {
var nyear = year;
var nmonth = month++;
if (month > 12) {
nmonth -= 12;
nyear++;
}
var n_date = new Date(nyear, nmonth, 1);
return (new Date(n_date.getTime() - 1000 * 60 * 60 * 24)).getDate();
}
转载于:https://www.cnblogs.com/ziye/archive/2013/05/31/3110571.html