Skip to content

Instance MethodFoundationEssentials

dateTimeSeparator(_:)

iOS 15.0+ iPadOS 15.0+ Mac Catalyst 15.0+ macOS 12.0+ tvOS 15.0+ watchOS 8.0+
Sets the character that separates the date and time components.
func dateTimeSeparator(_ separator: Date.ISO8601FormatStyle.DateTimeSeparator) -> Date.ISO8601FormatStyle

Parameters

separator

The character used to separate the date and time components.

Return Value

An ISO 8601 date format style with the provided date and time component separator.

Discussion

Possible values are Date.ISO8601FormatStyle.DateTimeSeparator.space and Date.ISO8601FormatStyle.DateTimeSeparator.standard. The default is Date.ISO8601FormatStyle.DateTimeSeparator.standard.