TimeZoneNames Class

Definition

TimeZoneNames is an abstract class representing the time zone display name data model defined by UTS#35 Unicode Locale Data Markup Language (LDML).

[Android.Runtime.Register("android/icu/text/TimeZoneNames", ApiSince=24, DoNotGenerateAcw=true)]
public abstract class TimeZoneNames : Java.Lang.Object, IDisposable, Java.Interop.IJavaPeerable, Java.IO.ISerializable
[<Android.Runtime.Register("android/icu/text/TimeZoneNames", ApiSince=24, DoNotGenerateAcw=true)>]
type TimeZoneNames = class
    inherit Object
    interface ISerializable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
TimeZoneNames
Attributes
Implements

Remarks

TimeZoneNames is an abstract class representing the time zone display name data model defined by UTS#35 Unicode Locale Data Markup Language (LDML). The model defines meta zone, which is used for storing a set of display names. A meta zone can be shared by multiple time zones. Also a time zone may have multiple meta zone historic mappings.

For example, people in the United States refer the zone used by the east part of North America as "Eastern Time". The tz database contains multiple time zones "America/New_York", "America/Detroit", "America/Montreal" and some others that belong to "Eastern Time". However, assigning different display names to these time zones does not make much sense for most of people.

In CLDR (which uses LDML for representing locale data), the display name "Eastern Time" is stored as long generic display name of a meta zone identified by the ID "America_Eastern". Then, there is another table maintaining the historic mapping to meta zones for each time zone. The time zones in the above example ("America/New_York", "America/Detroit"...) are mapped to the meta zone "America_Eastern".

Sometimes, a time zone is mapped to a different time zone in the past. For example, "America/Indiana/Knox" had been moving "Eastern Time" and "Central Time" back and forth. Therefore, it is necessary that time zone to meta zones mapping data are stored by date range.

<b>Note:</b>

TimeZoneFormat assumes an instance of TimeZoneNames is immutable. If you want to provide your own TimeZoneNames implementation and use it with TimeZoneFormat, you must follow the contract.

The methods in this class assume that time zone IDs are already canonicalized. For example, you may not get proper result returned by a method with time zone ID "America/Indiana/Indianapolis", because it's not a canonical time zone ID (the canonical time zone ID for the time zone is "America/Indianapolis". See TimeZone#getCanonicalID(String) about ICU canonical time zone IDs.

In CLDR, most of time zone display names except location names are provided through meta zones. But a time zone may have a specific name that is not shared with other time zones.

For example, time zone "Europe/London" has English long name for standard time "Greenwich Mean Time", which is also shared with other time zones. However, the long name for daylight saving time is "British Summer Time", which is only used for "Europe/London".

#getTimeZoneDisplayName(String, NameType) is designed for accessing a name only used by a single time zone. But is not necessarily mean that a subclass implementation use the same model with CLDR. A subclass implementation may provide time zone names only through #getTimeZoneDisplayName(String, NameType), or only through #getMetaZoneDisplayName(String, NameType), or both.

The default TimeZoneNames implementation returned by #getInstance(ULocale) uses the locale data imported from CLDR. In CLDR, set of meta zone IDs and mappings between zone IDs and meta zone IDs are shared by all locales. Therefore, the behavior of #getAvailableMetaZoneIDs(), #getAvailableMetaZoneIDs(String), #getMetaZoneID(String, long), and #getReferenceZoneID(String, String) won't be changed no matter what locale is used for getting an instance of TimeZoneNames.

Java documentation for android.icu.text.TimeZoneNames.

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.

Constructors

TimeZoneNames(IntPtr, JniHandleOwnership)

Properties

AvailableMetaZoneIDs
Class

Returns the runtime class of this Object.

(Inherited from Object)
Handle

The handle to the underlying Android instance.

(Inherited from Object)
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
ThresholdClass
ThresholdType

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetAvailableMetaZoneIDs(String)

Returns an immutable set of all available meta zone IDs used by the given time zone.

GetDisplayName(String, TimeZoneNames+NameType, Int64)
GetExemplarLocationName(String)

Returns the exemplar location name for the given time zone.

GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
GetInstance(Locale)

Returns an instance of TimeZoneNames for the specified java.util.Locale.

GetInstance(ULocale)

Returns an instance of TimeZoneNames for the specified locale.

GetMetaZoneDisplayName(String, TimeZoneNames+NameType)
GetMetaZoneID(String, Int64)

Returns the meta zone ID for the given canonical time zone ID at the given date.

GetReferenceZoneID(String, String)

Returns the reference zone ID for the given meta zone ID for the region.

GetTimeZoneDisplayName(String, TimeZoneNames+NameType)
GetTZDBInstance(ULocale)

Returns an instance of TimeZoneNames containing only short specific zone names (NameType#SHORT_STANDARD and NameType#SHORT_DAYLIGHT), compatible with the IANA tz database's zone abbreviations (not localized).

JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to