/*** 计算两个日期间隔天数*/
public class Demo5 {public static void main(String[] args) {//开始时间LocalDateTime start = LocalDateTime.of(2019, 1, 16, 0, 0, 0);//结束时间LocalDateTime end = LocalDateTime.of(2024, 7, 7, 0, 0, 0);//计算间隔Duration between = Duration.between(start, end);System.out.println("间隔:" + between.toDays() + "天");}
}