Width
- iOS
- 15.0+
- macOS
- 12.0+
- tvOS
- 15.0+
- watchOS
- 8.0+
enum Width
enum Width
s20FoundationEssentials4DateV0A20InternationalizationE11FormatStyleV6SymbolV8TimeZoneV5WidthO
What are these?4GTDS
import FoundationEssentials
import FoundationInternationalization
struct TimeZone
struct Date
Date
represents a single point in time.
struct FormatStyle
Strategies for formatting a Date
.
struct Symbol
case long
case short
static var exemplarLocation: Date.FormatStyle.Symbol.TimeZone { get }
The exemplar city (location) for the time zone. The localized exemplar city name for the special zone or unknown is used as the fallback if it is unavailable. For example, “Los Angeles”.
static var genericLocation: Date.FormatStyle.Symbol.TimeZone { get }
The generic location format. Falls back to longLocalizedGMT
if unavailable. Recommends for presenting possible time zone choices for user selection. For example, “Los Angeles Time”.
static let omitted: Date.FormatStyle.Symbol.TimeZone
The option for not including the symbol in the formatted output.
static func genericName(_ width: Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone
Generic non-location format. Falls back to genericLocation
if unavailable. For example, short: “PT”. Fallback again to localizedGMT(.short)
if genericLocation(.short)
is unavailable. long: “Pacific Time”
static func identifier(_ width: Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone
The time zone ID. For example, short: “uslax” long: “America/Los_Angeles”.
static func iso8601(_ width: Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone
The ISO8601 format with hours, minutes and optional seconds fields. For example, short: “-0800” long: “-08:00” or “-07:52:58”.
static func localizedGMT(_ width: Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone
Short localized GMT format. For example, short: “GMT-8” long: “GMT-8:00”
static func specificName(_ width: Date.FormatStyle.Symbol.TimeZone.Width) -> Date.FormatStyle.Symbol.TimeZone
Specific non-location format. Falls back to shortLocalizedGMT
if unavailable. For example, short: “PDT” long: “Pacific Daylight Time”.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol Sendable
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.