输出年月日序列数组:[
"2023/07/01",
"2023/07/02",
"2023/07/03",
"2023/07/04",
"2023/07/05",
"2023/07/06",
"2023/07/07",
"2023/07/08",
"2023/07/09",
"2023/07/10",
"2023/07/11"
]
function getYearMonthDayList(startDate, endDate) {
//startDate、endDate的格式可以为“yyyy/MM/dd”、“yyyy-MM-dd”、“yyyy年MM月dd日”或Date();
//返回年月日的数组,如[..."2022/07/10","2022/07/11","2022/07/12",...]
let st = new Date(startDate), diffDays = parseInt(Math.abs(new Date(endDate) - st) / (1000 * 60 * 60 * 24));
return [...Array(diffDays 1)].map((v, i) => new Date(new Date(startDate).setDate(s