Contents

iso8601(_:)

Creates the ISO 8601 representation of the timezone with hours, minutes, and optional seconds.

Declaration

static func iso8601(_ 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

For example, -0700 (Date.FormatStyle.Symbol.TimeZone.Width.short) or -07:00 (Date.FormatStyle.Symbol.TimeZone.Width.long).

See Also

Modifying a Time Zone