diff --git a/jeometry-common/src/main/java/org/jeometry/common/date/Dates.java b/jeometry-common/src/main/java/org/jeometry/common/date/Dates.java index c64d4648..58a2df5f 100644 --- a/jeometry-common/src/main/java/org/jeometry/common/date/Dates.java +++ b/jeometry-common/src/main/java/org/jeometry/common/date/Dates.java @@ -87,6 +87,14 @@ static String format(final DateFormat format, final Date date) { return format.format(date); } + static String format(final DateTimeFormatter formatter, final LocalDate date) { + if (date == null) { + return null; + } else { + return formatter.format(date); + } + } + static String format(final int dateStyle, final int timeStyle, final Timestamp timestamp) { final DateFormat format = DateFormat.getDateTimeInstance(dateStyle, timeStyle); return format(format, timestamp);