Java LocalDate to Date toDate(LocalDate date)

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

Description

to Date

License

Apache License

Declaration

public static Date toDate(LocalDate date) 

Method Source Code


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

import java.time.*;
import java.util.*;

public class Main {
    public static Date toDate(LocalDate date) {
        return date != null ? Date.from(date.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant()) : null;
    }//from   w ww.  j  a v a  2 s. co  m
}

Related

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