소스 검색

优化日期格式化处理逻辑

woody 9 달 전
부모
커밋
78f05bf1b2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      framework-common/src/main/java/com/chelvc/framework/common/util/DateUtils.java

+ 1 - 1
framework-common/src/main/java/com/chelvc/framework/common/util/DateUtils.java

@@ -81,7 +81,7 @@ public final class DateUtils {
      */
     private static final Map<Pattern, Parser> PATTERN_PARSER_MAPPING = ImmutableMap.<Pattern, Parser>builder()
             .put(
-                    StringUtils.getPattern("^-?[0-9]{1,13}$"),
+                    StringUtils.getPattern("^-?[0-9]+$"),
                     text -> new Date(Long.parseLong(text))
             ).put(
                     StringUtils.getPattern("^\\d{4}-\\d{1,2}-\\d{1,2}$"),