-
Sub-task
-
Resolution: Delivered
-
P4
-
15
-
generic
-
generic
-
Verified
`java.time.format.DateTimeFormatter.localizedBy(Locale)` method now honors the default locale values, such as `Chronology`and/or `DecimalStyle` of the specified locale argument.
For example, in previous JDK releases:
```
jshell> DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
.localizedBy(Locale.forLanguageTag("fa"))
.format(LocalDate.now())
$3 ==> "جمعه 1 مهٔ 2020"
```
the numbers are in Arabic (Western) numerals.
In JDK 15:
```
jshell> DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
.localizedBy(Locale.forLanguageTag("fa"))
.format(LocalDate.now())
$3 ==> "جمعه ۱ مهٔ ۲۰۲۰"
```
the numbers are in Extended Arabic-Indic numerals because it is the default numbering system for the Farsi locale.
For example, in previous JDK releases:
```
jshell> DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
.localizedBy(Locale.forLanguageTag("fa"))
.format(LocalDate.now())
$3 ==> "جمعه 1 مهٔ 2020"
```
the numbers are in Arabic (Western) numerals.
In JDK 15:
```
jshell> DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
.localizedBy(Locale.forLanguageTag("fa"))
.format(LocalDate.now())
$3 ==> "جمعه ۱ مهٔ ۲۰۲۰"
```
the numbers are in Extended Arabic-Indic numerals because it is the default numbering system for the Farsi locale.