Here you can find the source of toLocalDate(Date date)
public static LocalDate toLocalDate(Date date)
//package com.java2s; //License from project: Apache License import java.sql.Date; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.ZoneOffset; public class Main { public static LocalDate toLocalDate(Date date) { if (date == null) { return null; }/*ww w .jav a 2 s.c om*/ LocalDateTime ldt = LocalDateTime.ofInstant(new java.util.Date(date.getTime()).toInstant(), ZoneOffset.systemDefault()); return ldt.toLocalDate(); } }