Browse Source

Merge remote-tracking branch 'origin/3.x' into 3.x

developing
Jiaju Zhuang 4 years ago
parent
commit
619ea5e22f
  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_10 = "yyyy-MM-dd";
public static final String DATE_FORMAT_14 = "yyyyMMddHHmmss"; 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_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 = "yyyy-MM-dd HH:mm:ss";
public static final String DATE_FORMAT_19_FORWARD_SLASH = "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 { } else {
return DATE_FORMAT_19_FORWARD_SLASH; 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: case 17:
return DATE_FORMAT_17; return DATE_FORMAT_17;
case 14: case 14:

Loading…
Cancel
Save