Here you can find the source of toLocalDate(Date date)
public static LocalDate toLocalDate(Date date)
//package com.java2s; import com.google.common.base.Preconditions; import java.time.Instant; import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; public class Main { public static LocalDate toLocalDate(Date date) { Preconditions.checkNotNull(date, "Date should't be null"); return Instant.ofEpochMilli(date.getTime()).atZone(ZoneId.systemDefault()).toLocalDate(); }/*from w w w . j a va 2 s. c om*/ }