Java examples for java.time:LocalDate
now from LocalDate
//package com.java2s; import java.time.LocalDate; import java.time.ZoneId; import java.util.Date; public class Main { public static Date now() { return localDateToDate(LocalDate.now()); }//from www . ja v a2 s .co m public static Date localDateToDate(LocalDate localDate) { return Date.from(localDate.atStartOfDay(ZoneId.systemDefault()) .toInstant()); } }