Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8279185 Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate
  3. JDK-8282631

Release Note: Support for IsoFields in JapaneseDate/MinguoDate/ThaiBuddhistDate

    XMLWordPrintable

    Details

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

      Description

      Three chronologies in `java.time.chrono` package, namely `JapaneseChronology`, `MinguoChronology`, and `ThaiBuddhistChronology` now support ISO-based fields, such as `IsoFields.QUARTER_OF_YEAR`. These chronologies implement the new method, `isIsoBased()` which has been added in the `java.time.chrono.Chronology` interface. The boolean returned from this method indicates if the implementing chronology is `ISO` chronology based, which means it has the same year/month structure as `IsoChronology`.

      Here is an example:
      ```
      JapaneseDate.now().getLong(IsoFields.QUARTER_OF_YEAR)
      ```
      will return the correct quarter-of-year value, which used to be throwing an `UnsupportedTemporalTypeException` with prior JDK releases.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: