Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P4
    • Resolution: Delivered
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: core-libs
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      `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.

        Attachments

          Activity

            People

            • Assignee:
              naoto Naoto Sato
              Reporter:
              naoto Naoto Sato
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: