ZoneRules.Of 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.
Overloads
| Name | Description |
|---|---|
| Of(ZoneOffset) |
Obtains an instance of ZoneRules with a fixed offset. |
| Of(ZoneOffset, ZoneOffset, IList<ZoneOffsetTransition>, IList<ZoneOffsetTransition>, IList<ZoneOffsetTransitionRule>) |
Obtains an instance of ZoneRules. |
Of(ZoneOffset)
Obtains an instance of ZoneRules with a fixed offset.
[Android.Runtime.Register("of", "(Ljava/time/ZoneOffset;)Ljava/time/zone/ZoneRules;", "", ApiSince=26)]
public static Java.Time.Zone.ZoneRules? Of(Java.Time.ZoneOffset? offset);
[<Android.Runtime.Register("of", "(Ljava/time/ZoneOffset;)Ljava/time/zone/ZoneRules;", "", ApiSince=26)>]
static member Of : Java.Time.ZoneOffset -> Java.Time.Zone.ZoneRules
Parameters
- offset
- ZoneOffset
The non-null offset to use for the rules.
Returns
The zone rules with the specified fixed offset.
- Attributes
Exceptions
Thrown if offset is null.
Remarks
Obtains an instance of ZoneRules that has fixed zone rules.
Java reference for java.time.zone.ZoneRules.of.
Applies to
Of(ZoneOffset, ZoneOffset, IList<ZoneOffsetTransition>, IList<ZoneOffsetTransition>, IList<ZoneOffsetTransitionRule>)
Obtains an instance of ZoneRules.
[Android.Runtime.Register("of", "(Ljava/time/ZoneOffset;Ljava/time/ZoneOffset;Ljava/util/List;Ljava/util/List;Ljava/util/List;)Ljava/time/zone/ZoneRules;", "", ApiSince=26)]
public static Java.Time.Zone.ZoneRules? Of(Java.Time.ZoneOffset? baseStandardOffset, Java.Time.ZoneOffset? baseWallOffset, System.Collections.Generic.IList<Java.Time.Zone.ZoneOffsetTransition>? standardOffsetTransitionList, System.Collections.Generic.IList<Java.Time.Zone.ZoneOffsetTransition>? transitionList, System.Collections.Generic.IList<Java.Time.Zone.ZoneOffsetTransitionRule>? lastRules);
[<Android.Runtime.Register("of", "(Ljava/time/ZoneOffset;Ljava/time/ZoneOffset;Ljava/util/List;Ljava/util/List;Ljava/util/List;)Ljava/time/zone/ZoneRules;", "", ApiSince=26)>]
static member Of : Java.Time.ZoneOffset * Java.Time.ZoneOffset * System.Collections.Generic.IList<Java.Time.Zone.ZoneOffsetTransition> * System.Collections.Generic.IList<Java.Time.Zone.ZoneOffsetTransition> * System.Collections.Generic.IList<Java.Time.Zone.ZoneOffsetTransitionRule> -> Java.Time.Zone.ZoneRules
Parameters
- baseStandardOffset
- ZoneOffset
The non-null standard offset to use before legal rules were set.
- baseWallOffset
- ZoneOffset
The non-null wall offset to use before legal rules were set.
- standardOffsetTransitionList
- IList<ZoneOffsetTransition>
The non-null list of changes to the standard offset.
- transitionList
- IList<ZoneOffsetTransition>
The non-null list of transitions.
- lastRules
- IList<ZoneOffsetTransitionRule>
The non-null recurring last rules, with at most 16 entries.
Returns
The zone rules.
- Attributes
Exceptions
Thrown if any argument is null.
Thrown if lastRules contains more than 16 rules.
Remarks
Obtains an instance of a ZoneRules.
When transitionList is empty, Android 8 through 13 ignore baseWallOffset and the standard-offset transitions when they determine offsets and daylight savings. Android 14 through 17 use the base wall offset and the standard-offset transitions. In these implementations, lastRules are not used to determine offsets or transitions when transitionList is empty. Runtime updates can change this behavior.
Java reference for java.time.zone.ZoneRules.of.