List of utility methods to do LocalDate Format
String | getFormattedDateString(LocalDate date) format the LocalDate in "dd.MM.yyyy-XX" format return germanFormatter.format(date).toString();
|
LocalDate | getLocalDate(String dateStr, String formatStr) get Local Date if (Strings.isNullOrEmpty(dateStr)) { return null; final DateTimeFormatter dtf = DateTimeFormatter.ofPattern(formatStr); TemporalAccessor temp = dtf.parse(dateStr); return LocalDate.from(temp); |
boolean | isLocalDate(String value, DateTimeFormatter formatter) is Local Date try { LocalDate.parse(value, formatter); return true; } catch (Exception e) { return false; |
LocalDate | parseToLocalDate(String format, String date) parse To Local Date return parseToLocalDate(DateTimeFormatter.ofPattern(format), date);
|