LocalDateTime now = LocalDateTime.now();
String result1 = now.format(DateTimeFormatter.ISO_DATE);
String result2 = now.format(DateTimeFormatter.BASIC_ISO_DATE);
String result3 = now.format(DateTimeFormatter.ofPattern("yyyy/MM/dd"));
结果 2020-01-08
20200108
2020/01/08