📅  最后修改于: 2022-03-11 14:59:43.628000             🧑  作者: Mango
var start = moment('2016-09-01'), // Sept. 1st
end = moment('2016-11-02'), // Nov. 2nd
day = 0; // Sunday
var result = [];
var current = start.clone();
while (current.day(7 + day).isBefore(end)) {
result.push(current.clone());
}
console.log(result.map(m => m.format('LLLL')));