다음을 통해 공유


TimeZone.GetEquivalentID(String, Int32) Method

Definition

Returns an ID in the equivalency group that includes the given ID.

[Android.Runtime.Register("getEquivalentID", "(Ljava/lang/String;I)Ljava/lang/String;", "", ApiSince=24)]
public static string? GetEquivalentID (string? id, int index);
[<Android.Runtime.Register("getEquivalentID", "(Ljava/lang/String;I)Ljava/lang/String;", "", ApiSince=24)>]
static member GetEquivalentID : string * int -> string

Parameters

id
String

a system time zone ID

index
Int32

a value from 0 to n-1, where n is the value returned by countEquivalentIDs(id)

Returns

the ID of the index-th zone in the equivalency group containing 'id', or an empty string if 'id' is not a valid system ID or 'index' is out of range

Attributes

Remarks

Returns an ID in the equivalency group that includes the given ID. An equivalency group contains zones that have the same GMT offset and rules.

The given index must be in the range 0..n-1, where n is the value returned by countEquivalentIDs(id). For some value of 'index', the returned value will be equal to the given id. If the given id is not a valid system time zone, or if 'index' is out of range, then returns an empty string.

Java documentation for android.icu.util.TimeZone.getEquivalentID(java.lang.String, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to