@Test public void testAsDate() { String format = "dd-MM-yyyy"; DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format); DateFormat df = new SimpleDateFormat(format); LocalDate now = LocalDate.now(); String nowString = now.format(formatter); Date nowDate = DateUtil.asDate(now); assertThat(nowString).isEqualTo(df.format(nowDate)); }
public static Date asDate(LocalDate localDate) { return Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()) .toInstant()); }
DateUtil { public static Date asDate(LocalDate localDate) { return Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()) .toInstant()); } }
DateUtil { public static Date asDate(LocalDate localDate) { return Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()) .toInstant()); }  }
DateUtil { public static Date asDate(LocalDate localDate) { return Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()) .toInstant()); }  static Date asDate(LocalDate localDate); }
DateUtil { public static Date asDate(LocalDate localDate) { return Date.from(localDate.atStartOfDay().atZone(ZoneId.systemDefault()) .toInstant()); }  static Date asDate(LocalDate localDate);  }