Instance MethodFoundationEssentials
timeSeparator(_:)
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
Modifies the ISO 8601 date format style to use the specified time separator.
func timeSeparator(_ separator: Date.ISO8601FormatStyle.TimeSeparator) -> Date.ISO8601FormatStyle
Parameters
separatorThe character used to separate the hour and minute in a date.
Return Value
An ISO 8601 date format style modified to include the specified time separator style.
Discussion
Possible values are Date.ISO8601FormatStyle.TimeSeparator.colon and Date.ISO8601FormatStyle.TimeSeparator.omitted. The default is Date.ISO8601FormatStyle.TimeSeparator.omitted.