LocalDateTime与DateTimeFormatter

LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")): 2019-04-17 17:38:57
now.format(DateTimeFormatter.ISO_LOCAL_DATE):     2019-04-17
now.format(DateTimeFormatter.ISO_DATE):           2019-04-17
now.format(DateTimeFormatter.ISO_LOCAL_TIME):     17:38:57.062
now.format(DateTimeFormatter.ISO_TIME):           17:38:57.062
now.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME):2019-04-17T17:38:57.062
now.format(DateTimeFormatter.ISO_DATE_TIME):      2019-04-17T17:38:57.062
now.format(DateTimeFormatter.ISO_ORDINAL_DATE):   2019-107
now.format(DateTimeFormatter.ISO_WEEK_DATE):      2019-W16-3
now.format(DateTimeFormatter.BASIC_ISO_DATE):     20190417

原文地址:https://www.cnblogs.com/mumian2/p/10724994.html