mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
Fix date format differences Java 8 vs 9+
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895383 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7475b1f609
commit
d9b0e2ebfa
@ -281,7 +281,7 @@ public final class LocaleDateFormat {
|
|||||||
/**
|
/**
|
||||||
* 10 - MMM-yy
|
* 10 - MMM-yy
|
||||||
*/
|
*/
|
||||||
ABBREVIATED_MONTH_AND_YEAR("LLL-yy", null, null),
|
ABBREVIATED_MONTH_AND_YEAR(isOldFmt () ? "MMM-yy" : "LLL-yy", null, null),
|
||||||
/**
|
/**
|
||||||
* 11 - Base short date followed by a space, followed by base time with seconds removed.
|
* 11 - Base short date followed by a space, followed by base time with seconds removed.
|
||||||
* Seconds are removed by removing all "s" symbols and any symbol that directly precedes an
|
* Seconds are removed by removing all "s" symbols and any symbol that directly precedes an
|
||||||
@ -361,4 +361,8 @@ public final class LocaleDateFormat {
|
|||||||
return MapFormatBase.mapFormatId(loc, (Integer)mappedFormat);
|
return MapFormatBase.mapFormatId(loc, (Integer)mappedFormat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isOldFmt() {
|
||||||
|
return System.getProperty("java.version").startsWith("1.8");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user