Java LocalDate to Date toDate(LocalDate localDate)

Here you can find the source of toDate(LocalDate localDate)

Description

to Date

License

LGPL

Declaration

public static Date toDate(LocalDate localDate) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

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

import java.time.ZoneOffset;
import java.util.Date;

public class Main {
    public static Date toDate(LocalDate localDate) {
        Instant instant = localDate.atStartOfDay().toInstant(ZoneOffset.of("+0"));
        return Date.from(instant);
    }/*  w ww .  java 2s.com*/
}

Related

  1. toDate(LocalDate ld)
  2. toDate(LocalDate localDate)
  3. toDate(LocalDate localDate)
  4. toDate(LocalDate localDate)
  5. toDate(LocalDate localDate)
  6. toUtilDate(LocalDate localDate)