-
Type:
Sub-task
-
Resolution: Delivered
-
Priority:
P4
-
Affects Version/s: 19
-
Component/s: core-libs
-
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.
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.