java8 date

      System.out.println(LocalDate.now());
        System.out.println(LocalTime.now());
//获取星期几  
      System.out.println(LocalDate.now().minusDays(-1).format(DateTimeFormatter.ofPattern("E")));
        System.out.println(isForbiddenTime1());

        System.out.println(LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));

 

你可能感兴趣的:(基础知识)