📅  最后修改于: 2022-03-11 14:52:28.655000             🧑  作者: Mango
public static LocalDate dateInput(String userInput) {
DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("M/d/yyyy");
LocalDate date = LocalDate.parse(userInput, dateFormat);
System.out.println(date);
return date ;
}