What is the best way to convert a java.util.Date object to the new JDK 8/JSR-310 java.time.LocalDate?
java.util.Date
java.time.LocalDate
Date input = new Date(); Loca
You can convert in one line :
public static LocalDate getLocalDateFromDate(Date date){ return LocalDate.from(Instant.ofEpochMilli(date.getTime()).atZone(ZoneId.systemDefault())); }