Browse Source

Merge pull request #1713 from GodDai/master

添加两个精度只到分的时间格式
developing
Jiaju Zhuang 4 years ago committed by GitHub
parent
commit
01f35d0490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/main/java/com/alibaba/excel/util/DateUtils.java

8
src/main/java/com/alibaba/excel/util/DateUtils.java

@ -43,6 +43,8 @@ public class DateUtils {
public static final String DATE_FORMAT_10 = "yyyy-MM-dd";
public static final String DATE_FORMAT_14 = "yyyyMMddHHmmss";
public static final String DATE_FORMAT_16 = "yyyy-MM-dd HH:mm";
public static final String DATE_FORMAT_16_FORWARD_SLASH = "yyyy/MM/dd HH:mm";
public static final String DATE_FORMAT_17 = "yyyyMMdd HH:mm:ss";
public static final String DATE_FORMAT_19 = "yyyy-MM-dd HH:mm:ss";
public static final String DATE_FORMAT_19_FORWARD_SLASH = "yyyy/MM/dd HH:mm:ss";
@ -91,6 +93,12 @@ public class DateUtils {
} else {
return DATE_FORMAT_19_FORWARD_SLASH;
}
case 16:
if (dateString.contains(MINUS)) {
return DATE_FORMAT_16;
} else {
return DATE_FORMAT_16_FORWARD_SLASH;
}
case 17:
return DATE_FORMAT_17;
case 14:

Loading…
Cancel
Save