Java8 日期DateTimeFormatter LocalDateTime
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyyMMdd"); System.out.println(dtf.format(LocalDateTime.now())); System.out.println(dtf.format(LocalDateTime.now().plusDays(1))); System.out.println(LocalDateTime.now().getDayOfWeek().getValue());