List of utility methods to do LocalDate Create
LocalDate | getCurrentLocalDate() get Current Local Date return LocalDate.now(ZoneId.systemDefault());
|
LocalDate | getCurrentLocalDate() Returns the current London local date. return Calendar.getInstance().getTime().toInstant().atZone(TimeZone.getTimeZone("Europe/London").toZoneId()) .toLocalDate(); |
LocalDate | getCurrentLocalDate() get the current date and time in LocalDate format Calendar currentDateTime = Calendar.getInstance();
LocalDate currentDate = LocalDate.parse(dateFormat.format(currentDateTime.getTime()).toString(),
germanFormatter);
return currentDate;
|
void | getLocalDate(int year, int atDay) get Local Date LocalDate date = Year.of(year).atDay(atDay); |
LocalDate | getLocalDate(java.util.Date date) Convert a Date to a LocalDate at the system's default time zone. if (date == null) return null; return getLocalDateTime(date).toLocalDate(); |
LocalDate | getLocalDate(long timeInMillis) Get LocalDate for time in milli seconds. return getLocalDateTime(timeInMillis).toLocalDate();
|
LocalDate | toLocalDate(Calendar calendar) Convert a Calendar value into a LocalDate . if (calendar != null) { return LocalDate.of(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1, calendar.get(Calendar.DAY_OF_MONTH)); return null; |
LocalDate | toLocalDate(final Date date) to Local Date if (date == null) { return null; } else { String str = new SimpleDateFormat("yyyy-MM-dd").format(date); return LocalDate.parse(str); |