最后会输出【开始时间,,,,,,,,,结束时间】
const dates = [];
const currentDate = new Date("您的开始时间");
const endDateObj = new Date("您的结束时间");
currentDate.setDate(currentDate.getDate());
while (currentDate <= endDateObj) {
dates.push(getTime(currentDate));
currentDate.setDate(currentDate.getDate()+1);
}
console.log("dates111", dates);