DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate localDate1 = 时间随便写。
LocalDate localDate2 = LocalDate .now();
Period.between(localDate1 ,localDate2) .getDays() // 获取天数
LocalDateTime time2 = 时间
Duration.between(time2, LocalDateTime.now()).toMinutes();//获取分钟
Duration.between(time2, LocalDateTime.now()).toHours();//获取小时
LocalDate.parse(time2 ).isAfter(LocalDate.now());//在当前时间之后
.isBefore //在当前时间之前