// 转化日期  将所有格式转为2024-08-01
import dayjs from 'dayjs';

export function convertDates(dates) {
  return dates.map(date => {
    if (typeof date ==='string') {
      return dayjs(date).format('YYYY-MM-DD');
    }else if(typeof date ==='object') {
      let standardDay = date.getTime(date);
      return dayjs(standardDay).format('YYYY-MM-DD');
    }
  }).filter(Boolean);
}