Skip to content

//core/io.islandtime/TimeZone/displayName

displayName

common

fun displayName(style: TimeZoneTextStyle, locale: Locale): String

A textual representation of this time zone, suitable for display purposes. The localized name will be returned, if available for the locale in the specified style. If not, the id will be returned instead.

The result depends on the configured TimeZoneTextProvider and may differ between platforms.

Example output for the "America/New_York" ID and "en-US" locale:

  • Standard: "Eastern Standard Time"
  • Short standard: "EST"
  • Daylight Saving: "Eastern Daylight Time"
  • Short daylight saving: "EDT"
  • Generic: "Eastern Time"
  • Short generic: "ET"

See also

TimeZone.localizedName
TimeZone.id