📅  最后修改于: 2022-03-11 15:03:26.908000             🧑  作者: Mango
function mondaysInMonth(m,y) {
var days = new Date(y,m,0).getDate();
var mondays = new Date(m +'/01/'+ y).getDay();
if(mondays != 1){
mondays = 9 - mondays;
}
mondays = [mondays];
//console.log(mondays);
for (var i = mondays[0] + 7; i <= days; i += 7) {
mondays.push(i);
}
return mondays;
}