mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8247781: Day periods support
Reviewed-by: scolebourne, rriggs, joehw
This commit is contained in:
parent
0357db3581
commit
bf84dac4cf
20 changed files with 1155 additions and 203 deletions
|
@ -758,6 +758,11 @@ public class DateFormatSymbols implements Serializable, Cloneable {
|
|||
dfs.months = resource.getStringArray("MonthNames");
|
||||
dfs.shortMonths = resource.getStringArray("MonthAbbreviations");
|
||||
dfs.ampms = resource.getStringArray("AmPmMarkers");
|
||||
// the array in the resource bundle may contain more elements for day periods.
|
||||
// Extract only am/pm.
|
||||
if (dfs.ampms.length > 2) {
|
||||
dfs.ampms = Arrays.copyOf(dfs.ampms, 2);
|
||||
}
|
||||
dfs.localPatternChars = resource.getString("DateTimePatternChars");
|
||||
|
||||
// Day of week names are stored in a 1-based array.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue