Contents

timeZone(_:)

Modifies the date format style to use the specified time zone format style.

Declaration

func timeZone(_ format: Date.FormatStyle.Symbol.TimeZone = .specificName(.short)) -> Date.FormatStyle

Parameters

  • format:

    The time zone format style applied to the date format style.

Return Value

A date format style modified to include the specified time zone format style.

Discussion

Values of Date.FormatStyle.Symbol.TimeZone are exemplarLocation and genericLocation.

Static methods that return Date.FormatStyle.Symbol.TimeZone objects include genericName(_:), identifier(_:), iso8601(_:), localizedGMT(_:), and specificName(_:).

See Also

Specifying the Time Format