DateFormatSymbols.GetZoneStrings Method

Definition

Gets time zone strings.

[Android.Runtime.Register("getZoneStrings", "()[[Ljava/lang/String;", "GetGetZoneStringsHandler")]
public virtual string[][]? GetZoneStrings ();
[<Android.Runtime.Register("getZoneStrings", "()[[Ljava/lang/String;", "GetGetZoneStringsHandler")>]
abstract member GetZoneStrings : unit -> string[][]
override this.GetZoneStrings : unit -> string[][]

Returns

String[][]

the time zone strings.

Attributes

Remarks

Gets time zone strings. Use of this method is discouraged; use java.util.TimeZone#getDisplayName() TimeZone.getDisplayName() instead.

The value returned is a two-dimensional array of strings of size <em>n</em> by <em>m</em>, where <em>m</em> is at least 5. Each of the <em>n</em> rows is an entry containing the localized names for a single TimeZone. Each such row contains (with i ranging from 0..<em>n</em>-1): <ul> <li>zoneStrings[i][0] - time zone ID</li> <li>zoneStrings[i][1] - long name of zone in standard time</li> <li>zoneStrings[i][2] - short name of zone in standard time</li> <li>zoneStrings[i][3] - long name of zone in daylight saving time</li> <li>zoneStrings[i][4] - short name of zone in daylight saving time</li> </ul> The zone ID is <em>not</em> localized; it's one of the valid IDs of the java.util.TimeZone TimeZone class that are not custom IDs. All other entries are localized names. If a zone does not implement daylight saving time, the daylight saving time names should not be used.

If #setZoneStrings(String[][]) setZoneStrings has been called on this DateFormatSymbols instance, then the strings provided by that call are returned. Otherwise, the returned array contains names provided by the runtime.

Java documentation for java.text.DateFormatSymbols.getZoneStrings().

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