

export function setExtremumDate(dataList){
  let startDateList = dataList.map(it => it.StartDate)
                                  .filter(Boolean)
                                  .sort((a,b)=> new Date(a).getTime() - new Date(b).getTime())
  //过滤、排序 拿到最新日期
  let endDateList = dataList.map(it => it.LatestDate)
                                .filter(Boolean)
                                .sort((a,b)=> new Date(b).getTime() - new Date(a).getTime())

  return {earliestDate:startDateList[0],latestDate:endDateList[0]}
}