Skip to content

Commit

Permalink
Merge pull request #30 from refractions-research/exportdatefix
Browse files Browse the repository at this point in the history
date format export fix
  • Loading branch information
egouge authored Mar 12, 2024
2 parents 35d8b1a + 6990414 commit 0cd15b2
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,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);
Expand Down Expand Up @@ -451,7 +459,7 @@ static Timestamp getTimestamp(final String dateString) {
if (dateString != null) {
final Instant instant = Instant.parse(dateString);
return Timestamp.from(instant);
} else {
} else {
return null;
}
}
Expand Down

0 comments on commit 0cd15b2

Please sign in to comment.