ZoneRules.IsDaylightSavings(Instant) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Checks whether the specified instant is in daylight savings.
[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
Parameters
- instant
- Instant
The instant to check for daylight savings. null may be ignored if the offsets can be determined without it.
Returns
true if the specified instant is in daylight savings; otherwise, false.
- Attributes
Exceptions
Thrown if instant is null and the implementation requires it to determine the offsets.
May be thrown while applying recurring rules. For example, Android 8 through 13 throw for Max when they need recurring rules. Runtime updates can change this behavior.
Remarks
Checks if the specified instant is in daylight savings. This checks if the standard offset and the actual offset are the same for the specified instant. If they are not, it is assumed that daylight savings is in operation. This default implementation compares the actual and standard offsets.
When there are no fully defined wall-offset transitions, Android 8 through 13 return false. Android 14 through 17 compare the initial wall offset with the standard offset at the specified instant. Runtime updates can change this behavior.
Java reference for java.time.zone.ZoneRules.isDaylightSavings.