Here you can find the source of stringDateToLocalDate(String day, String month, String year)
public static LocalDate stringDateToLocalDate(String day, String month, String year)
//package com.java2s; //License from project: Open Source License import java.time.LocalDate; import java.time.format.DateTimeFormatter; public class Main { public static DateTimeFormatter simpleDateFormatter = DateTimeFormatter.ofPattern("MM-dd-yyyy"); public static LocalDate stringDateToLocalDate(String day, String month, String year) { final StringBuilder sb = new StringBuilder().append(month).append("-").append(day).append("-").append(year); return LocalDate.parse(sb.toString(), simpleDateFormatter); }/*from w w w . jav a2 s. c om*/ }