import dayjs from 'dayjs' // 获取指定时间范围内的所有日期 export function getRangeAllTime(startDate: string, endDate: string) { console.log(`${startDate}-${endDate}`) const dates = [] let currentDate = dayjs(startDate) const formattedEndDate = dayjs(endDate).format('YYYY-MM-DD') while (currentDate.format('YYYY-MM-DD') <= formattedEndDate) { dates.push(currentDate.format('YYYY-MM-DD')) currentDate = currentDate.add(1, 'day') } return dates }