OffsetDateTime.IsBefore(OffsetDateTime) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
检查此日期时间的即时是否在指定的日期时间之前。
[Android.Runtime.Register("isBefore", "(Ljava/time/OffsetDateTime;)Z", "", ApiSince=26)]
public bool IsBefore(Java.Time.OffsetDateTime? other);
[<Android.Runtime.Register("isBefore", "(Ljava/time/OffsetDateTime;)Z", "", ApiSince=26)>]
member this.IsBefore : Java.Time.OffsetDateTime -> bool
参数
- other
- OffsetDateTime
要比较的其他日期时间,而不是 null
返回
如果这是在指定日期时间的即时之前,则为 true
- 特性
注解
检查此日期时间的即时是否在指定的日期时间之前。 此方法不同于 compareTo(java.time.OffsetDateTime)中的比较,因为它仅比较日期时间的即时。 这相当于使用 dateTime1.toInstant(.isBefore(dateTime2.toInstant());。
Java参考java.time.OffsetDateTime.isBefore。