package temporal.TemporalUnit; import java.time.chrono.JapaneseDate; import java.time.temporal.IsoFields; import java.time.temporal.Temporal; import java.time.temporal.UnsupportedTemporalTypeException; public class Test { public static void main(String[] args) { Temporal temporal = JapaneseDate.now(); if (IsoFields.WEEK_BASED_YEARS.isSupportedBy(temporal)) { try { temporal.minus(1, IsoFields.WEEK_BASED_YEARS); } catch (UnsupportedTemporalTypeException ute) { System.out.println("We don't expect UnsupportedTemporalTypeException since the temporal unit is supported by the temporal"); } catch (Exception ex) { // other exceptions is OK } } } }