LocalDate today = LocalDate.now() //获取当前日期 年月日
LocalDate 与 String 之间的转换
LocalDate today = LocalDate.now();
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateStr = today.format(fmt);
String str = "2019-03-03";
//指定转换格式
DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd");
//进行转换
LocalDate date = LocalDate.parse(str, fmt);