List of utility methods to do LocalDate from Date
LocalDate | toLocalDate(Date calendar) to Local Date return Instant.ofEpochMilli(calendar.getTime()).atZone(ZoneId.systemDefault()).toLocalDate();
|
LocalDate | toLocalDate(Date date) to Local Date Preconditions.checkNotNull(date, "Date should't be null"); return Instant.ofEpochMilli(date.getTime()).atZone(ZoneId.systemDefault()).toLocalDate(); |
LocalDate | toLocalDate(Date date) to Local Date Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
LocalDate localeData = LocalDate.of(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH),
calendar.get(Calendar.DAY_OF_MONTH));
return localeData;
|
LocalDate | toLocalDate(Date date) to Local Date return LocalDate.from(date.toInstant());
|