Commit 4bc4b847 by wangli

新增datetimeString2LocalDateTime

1 parent 6c761ee4
...@@ -43,6 +43,10 @@ public class TimeUtils { ...@@ -43,6 +43,10 @@ public class TimeUtils {
return LocalDate.parse(s, DateTimeFormatter.ofPattern(pattern)); return LocalDate.parse(s, DateTimeFormatter.ofPattern(pattern));
} }
public static final LocalDateTime IsoDateTime2LocalDateTime(String s) {
return LocalDateTime.parse(s, DateTimeFormatter.ofPattern(DATE_TIME_FORMAT));
}
public static final String IsoLocalDate2String(LocalDate localDate) { public static final String IsoLocalDate2String(LocalDate localDate) {
return localDate.format(DateTimeFormatter.ofPattern(DATE_GAP_FORMAT)); return localDate.format(DateTimeFormatter.ofPattern(DATE_GAP_FORMAT));
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!