package com.zhuiyi.pal.quality.inspection;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneOffset;
import java.util.ArrayList;
import java.util.List;
public class Qytystty {
public static void main(String[] args) {
long timestamp1 = 1638462963000l;
long timestamp2 = 1640067009273l;
System.out.print(getTwoDaysDay(timestamp1, timestamp2));
}
public static List getTwoDaysDay(Long dateStart, Long dateEnd) {
List dateList = new ArrayList();
//逐日打印日期
LocalDate startDate = Instant.ofEpochMilli(dateStart).atZone(ZoneOffset.ofHours(8)).toLocalDate();
LocalDate endDate = Instant.ofEpochMilli(dateEnd).atZone(ZoneOffset.ofHours(8)).toLocalDate();
dateList.add(startDate.toString());
while (startDate.isBefore(endDate)) {
startDate = startDate.plusDays(1);
dateList.add(startDate.toString());
}
return dateList;
}
}