English 中文(简体)
Java 10 - Locale Enhancement
  • 时间:2024-12-22

Java 10 - Locale Enhancements

Previous Page Next Page  

JEP 314 - Unicode Language-Tag Extensions

Java 7 introduced support for BCP 47 Language tags. But this unicode locale extensions was pmited to calendar and numbers. With Java 10, java.util.Locale and related classes are updated to implement additional unicode extensions as specified in LDML specification. Following additional extensions are added.

    cu − Currency Types

    fw − First Day of a Week

    rg − Region Override

    tz − Time Zone

Following APIs are updated.


java.text.DateFormat::get*Instance
java.text.DateFormatSymbols::getInstance
java.text.DecimalFormatSymbols::getInstance
java.text.NumberFormat::get*Instance
java.time.format.DateTimeFormatter::locapzedBy
java.time.format.DateTimeFormatterBuilder::getLocapzedDateTimePattern
java.time.format.DecimalStyle::of
java.time.temporal.WeekFields::of
java.util.Calendar::{getFirstDayOfWeek,getMinimalDaysInWeek}
java.util.Currency::getInstance
java.util.Locale::getDisplayName
java.util.spi.LocaleNameProvider
Advertisements