File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
jeometry-common/src/main/java/org/jeometry/common/date Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,14 @@ static String format(final DateFormat format, final Date date) {
64
64
return format .format (date );
65
65
}
66
66
67
+ static String format (final DateTimeFormatter formatter , final LocalDate date ) {
68
+ if (date == null ) {
69
+ return null ;
70
+ } else {
71
+ return formatter .format (date );
72
+ }
73
+ }
74
+
67
75
static String format (final int dateStyle , final int timeStyle , final Timestamp timestamp ) {
68
76
final DateFormat format = DateFormat .getDateTimeInstance (dateStyle , timeStyle );
69
77
return format (format , timestamp );
@@ -451,7 +459,7 @@ static Timestamp getTimestamp(final String dateString) {
451
459
if (dateString != null ) {
452
460
final Instant instant = Instant .parse (dateString );
453
461
return Timestamp .from (instant );
454
- } else {
462
+ } else {
455
463
return null ;
456
464
}
457
465
}
You can’t perform that action at this time.
0 commit comments