ZoneRules.IsDaylightSavings(Instant) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
檢查指定的即時時間是否在夏令時間內。
[Android.Runtime.Register("isDaylightSavings", "(Ljava/time/Instant;)Z", "", ApiSince=26)]
public bool IsDaylightSavings(Java.Time.Instant? instant);
[<Android.Runtime.Register("isDaylightSavings", "(Ljava/time/Instant;)Z", "", ApiSince=26)>]
member this.IsDaylightSavings : Java.Time.Instant -> bool
參數
- instant
- Instant
立即查看夏令時間。 固定偏移規則可忽略 null;變數規則則不行。
傳回
true若指定時間為夏令時間;否則,。 false
- 屬性
例外狀況
如果 instant 是 null 且規則不是固定偏移,則會被拋出。
備註
檢查指定的即時時間是否在夏令時間內。 這會檢查指定瞬間的標準偏移量與實際偏移量是否相同。 如果沒有,則假設夏令時間正在實施。 此預設實作比較實際與標準偏移量。
Java 參考 java.time.zone.ZoneRules.isDaylightSavings。