java.time.OffsetDateTime.isSupported(TemporalUnit unit) java.time.OffsetDateTime.isSupported() 方法示例 java.time.OffsetDateTime.minus() 方法示例 java.time.OffsetDateTime.isSupported(TemporalUnit unit) package com.codingdict; import java.time.OffsetDateTime; import java.time.temporal.ChronoUnit; public class OffsetDateTimeDemo { public static void main(String[] args) { OffsetDateTime date = OffsetDateTime.parse("2020-02-03T12:30:30+01:00"); System.out.println(date.isSupported(ChronoUnit.DAYS)); } } java.time.OffsetDateTime.isSupported() 方法示例 java.time.OffsetDateTime.minus() 方法示例