Here you can find the source of getLocalDate(java.util.Date date)
public static LocalDate getLocalDate(java.util.Date date)
//package com.java2s; //License from project: BSD License import java.time.*; public class Main { /**//from ww w . ja va 2 s .c o m * Convert a Date to a LocalDate at the system's default time zone. Returns null on null input. */ public static LocalDate getLocalDate(java.util.Date date) { if (date == null) return null; return getLocalDateTime(date).toLocalDate(); } /** * Convert a Date to a LocalDateTime at the system's default time zone. Returns null on null input. */ public static LocalDateTime getLocalDateTime(java.util.Date date) { if (date == null) return null; return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); } }