java.time.OffsetTime.isSupported(TemporalUnit unit) java.time.OffsetTime.isSupported() 方法示例 java.time.OffsetTime.minus() 方法示例 java.time.OffsetTime.isSupported(TemporalUnit unit) package com.codingdict; import java.time.OffsetTime; import java.time.temporal.ChronoUnit; public class OffsetTimeDemo { public static void main(String[] args) { OffsetTime time = OffsetTime.parse("12:30:30+01:00"); System.out.println(time.isSupported(ChronoUnit.HOURS)); } } java.time.OffsetTime.isSupported() 方法示例 java.time.OffsetTime.minus() 方法示例