Java LocalDate to Date toDate(LocalDate ld)

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

Description

to Date

License

Apache License

Declaration

public static Date toDate(LocalDate ld) 

Method Source Code

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

import java.time.LocalDate;
import java.util.Calendar;
import java.util.Date;

public class Main {
    public static Date toDate(LocalDate ld) {
        Calendar c = Calendar.getInstance();
        c.set(ld.getYear(), ld.getMonthValue() - 1, ld.getDayOfMonth());
        Date dateNew = c.getTime();

        return dateNew;
    }/*from  ww  w.j a  v a 2 s .  c om*/
}

Related

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