Java8:LocalDate: parse yyyy-MM
LocalDate: parse yyyy-MMLocalDate不能直接转换年月,会有java.time.format.DateTimeParseException解决方法:DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM");YearMonth ym = YearMonth.parse("2020-04", fmt...
原创
2020-04-25 15:35:35 ·
10473 阅读 ·
3 评论