getDisplayName (Time Zone - JavaScript)

Returns a name of this time zone suitable for presentation to the user in the specified locale.

The variations include the following:
  • Returns a name of this time zone suitable for presentation to the user in the default locale. This method returns the long name, not including daylight saving. If the display name is not available for the locale, then this method returns a string in the format GMT[+-]hh:mm.
  • Returns a name of this time zone suitable for presentation to the user in the default locale. If the display name is not available for the locale, then this method returns a string in the format GMT[+-]hh:mm.
  • Returns a name of this time zone suitable for presentation to the user in the specified locale. This method returns the long name, not including daylight saving. If the display name is not available for the locale, then this method returns a string in the format GMT[+-]hh:mm.
  • Returns a name of this time zone suitable for presentation to the user in the specified locale. If the display name is not available for the locale, then this method returns a string in the format GMT[+-]hh:mm.

Defined in

TimeZone (JavaScript)

Syntax

getDisplayName() : string

getDisplayName(b:boolean, n:int) : string

getDisplayName(b:boolean, n:int, Locale:Locale) : string

getDisplayName(Locale:Locale) : string
Parameters Description
b If true, return the daylight saving name
n Either LONG or SHORT.
Locale The locale in which to supply the display name.
Return value Description
string The readable name of this time zone in the default locale.