Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8202088 Japanese new era implementation
  3. JDK-8203360

Release Note: Japanese New Era Implementation

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: P4
    • Resolution: Delivered
    • Affects Version/s: 7u221, 8u211, 11
    • Fix Version/s: 11
    • Component/s: core-libs
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        Japanese calendars, both in `java.time.chrono` and `java.util` packages support the upcoming Japanese new era, which will be in effect from May 1st, 2019. At the moment, the name of the era is not yet known, placeholder names ("元号" for Japanese, "NewEra" for other languages) are provided for its display names. The placeholder names will be replaced with the legitimate era name in a future update, thus applications should not depend on those placeholder names. Use integer values to refer to the new era instead. For example:

        `java.time.chrono.JapaneseEra.of(3).getDisplayName(TextStyle.FULL, Locale.US)`

        or
        ```
        new java.util.Calendar.Builder()
            .setCalendarType("japanese")
            .setFields(Calendar.ERA, 5,
                Calendar.YEAR, 1,
                Calendar.MONTH, Calendar.MAY,
                Calendar.DAY_OF_MONTH, 1)
            .build()
            .getDisplayName(Calendar.ERA, Calendar.LONG, Locale.US)
        ```
        will output "NewEra"

          Attachments

            Issue Links

              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: