//某年某月最后一天
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();
}

 posted on 2013-05-31 16:06  ziye.cc  阅读(809)  评论(0编辑  收藏  举报