如果他从Java 8中的新功能LocalDate开始,SimpleDateFormat将无法工作。从我所看到的,您将不得不使用DateTimeFormatter,http://docs.oracle.com/javase/8/docs/api/java/ time / format / DateTimeFormatter.html。
LocalDate localDate = LocalDate.Now();//For reference
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd LLLL yyyy");
String formattedString = localDate.format(formatter);
该日期应为1988年5月5日。要获取第二天之后和该月之前的时间,您可能必须使用“ dd’.LLLL y??yyy”