Contents

genericName(_:)

Returns the generic, non-location representation of a timezone.

Declaration

static func genericName(_ width: Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone

Parameters

  • width:

    Specifies the width of the string result.

Return Value

A timezone format style appropriate for the locale and specified width.

Discussion

The value falls back to the value of localizedGMT(_:) with a short width if unavailable. For example, PT (Date.FormatStyle.Symbol.TimeZone.Width.short) or Pacific Time (Date.FormatStyle.Symbol.TimeZone.Width.long).

See Also

Modifying a Time Zone