Java LocalDate to Date localDateToDate(LocalDate date)

Here you can find the source of localDateToDate(LocalDate date)

Description

local Date To Date

License

Open Source License

Declaration

public static Date localDateToDate(LocalDate date) 

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.util.Date;

public class Main {
    public static final ZoneId DEFAULT_ZONE = ZoneId.systemDefault();

    public static Date localDateToDate(LocalDate date) {
        Date value;//  w  ww  . j  a v  a 2s .  com
        Instant instant = Instant.from(date.atStartOfDay(DEFAULT_ZONE));
        value = Date.from(instant);

        return value;
    }
}

Related

  1. convertToDate(LocalDate localDate)
  2. date(LocalDate d, ZoneId zone)
  3. date(LocalDate date)
  4. date(LocalDate date)
  5. date(LocalDate date)
  6. localDateToDate(LocalDate ld)
  7. toDate(final LocalDate localDate)
  8. toDate(LocalDate date)
  9. toDate(LocalDate finalProjectDate, ZoneId zone)