misi1987107 commented on code in PR #9969:
URL: https://github.com/apache/seatunnel/pull/9969#discussion_r2450142246
##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/utils/DateTimeUtils.java:
##########
@@ -314,12 +316,25 @@ public static String toString(LocalDateTime dateTime,
Formatter formatter) {
return dateTime.format(FORMATTER_MAP.get(formatter));
}
+ public static String toString(LocalDate date, Formatter formatter) {
+ return date.format(FORMATTER_MAP.get(formatter));
+ }
+
+ public static String toString(OffsetDateTime offsetDateTime, Formatter
formatter) {
+ return offsetDateTime.format(FORMATTER_MAP.get(formatter));
+ }
+
+ public static String toString(Temporal temporal, Formatter formatter) {
+ return FORMATTER_MAP.get(formatter).format(temporal);
+ }
+
public static String toString(long timestamp, Formatter formatter) {
Instant instant = Instant.ofEpochMilli(timestamp);
return toString(LocalDateTime.ofInstant(instant,
ZoneId.systemDefault()), formatter);
}
public enum Formatter {
+ YYYY_MM_DD("yyyy-MM-dd"),
Review Comment:
Ok,I got it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]