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

    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved: