// 列出两个日期之间所有的日期
enumerateDaysBetweenDates(startDate, endDate){
let daysList = [];
const start = this.$moment(startDate);
const end = this.$moment(endDate);
const day = end.diff(start, "days");
daysList.push(start.format("yyyyMMDD"));
for (let i = 1; i <= day; i++) {
daysList.push(start.add(1, "days").format("yyyyMMDD"));
}
return daysList;
}
enumerateDaysBetweenDates('20221022', '20221024')
输出结果['20221022', '20221023', '20221024']