Java LocalDate from Date toLocalDate(Date calendar)

Here you can find the source of toLocalDate(Date calendar)

Description

to Local Date

License

Open Source License

Declaration

public static LocalDate toLocalDate(Date calendar) 

Method Source Code


//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*/
}

Related

  1. toLocalDate(Date date)
  2. toLocalDate(Date date)
  3. toLocalDate(Date date)