LocalDate tomorrow = LocalDate.of(2018, 6, 20); LocalDate now = LocalDate.of(2018, 6, 20); long l = now.toEpochDay() - tomorrow.toEpochDay(); System.out.println("相差天数 " + l); 输出:相差天数 0
LocalDate now = LocalDate.of(2018, 6, 20);
long l = now.toEpochDay() - tomorrow.toEpochDay();
System.out.println("相差天数 " + l);
输出: 相差天数 0