/**
* 获取当前时间和endTime间隔天数
* @param endTime
* @return 天数
*/
public static long daysBetween(long endTime) {
LocalDate startTime = LocalDate.now();
return startTime.until(Instant.ofEpochMilli(endTime).atZone(ZoneOffset.ofHours(8)).toLocalDate(), ChronoUnit.DAYS);
}






网友评论