Java LocalDate Calculate changeDateToLocalDate(Date value)

Here you can find the source of changeDateToLocalDate(Date value)

Description

change Date To Local Date

License

Open Source License

Declaration

public static LocalDate changeDateToLocalDate(Date value) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.time.Instant;
import java.time.LocalDate;

import java.time.ZoneId;
import java.time.ZonedDateTime;

import java.util.Date;

public class Main {
    public static LocalDate changeDateToLocalDate(Date value) {
        if (value == null || value.toInstant() == null)
            return null;
        Instant instant = value.toInstant();
        ZonedDateTime zdt = instant.atZone(ZoneId.systemDefault());
        LocalDate date = zdt.toLocalDate();
        return date;
    }//  w w  w  .ja v  a  2  s .c o  m
}

Related

  1. asEpochMilli(final LocalDate localDate)
  2. atEndOfDay(LocalDate date)
  3. before(final LocalDate d1, final LocalDate d2)
  4. calcNextDayOfWeek(LocalDate d, DayOfWeek dow)
  5. calculateAge(LocalDate birthDate, LocalDate currentDate)
  6. convert(LocalDate ld)
  7. convertDatabaseDateToUS(LocalDate databaseDate)
  8. converterToLocalDate(final String date)
  9. convertLocalDateToDatabaseDateString(LocalDate localDate)