📅  最后修改于: 2022-03-11 15:00:24.139000             🧑  作者: Mango
function getCurrentWeek() {
var currentDate = moment();
var weekStart = currentDate.clone().startOf('isoWeek');
var weekEnd = currentDate.clone().endOf('isoWeek');
var days = [];
for (var i = 0; i <= 6; i++) {
days.push(moment(weekStart).add(i, 'days').format("MMMM Do,dddd"));
}
console.log(days);
}
getCurrentWeek();