Here you can find the source of dateToLocalDate(Date d)
Parameter | Description |
---|---|
d | a parameter |
public static LocalDate dateToLocalDate(Date d)
//package com.java2s; //License from project: Open Source License import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; public class Main { /**/* ww w .ja va 2 s. co m*/ * @param d * @return local date */ public static LocalDate dateToLocalDate(Date d) { return d.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); } }