Here you can find the source of toLocalDate(Date calendar)
public static LocalDate toLocalDate(Date calendar)
//package com.java2s; import java.time.Instant; import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; public class Main { public static LocalDate toLocalDate(Date calendar) { return Instant.ofEpochMilli(calendar.getTime()).atZone(ZoneId.systemDefault()).toLocalDate(); }/* ww w . j a va2s .c o m*/ }