Type Method_StringProcessing
iso8601(timeZone:includingFractionalSeconds:dateSeparator:dateTimeSeparator:timeSeparator:)
iOS 16.0+
iPadOS 16.0+
Mac Catalyst 16.0+
macOS 13.0+
tvOS 16.0+
watchOS 9.0+
Creates a regex component to match an ISO 8601 date and time string without time zone, and capture the string as a
Date using the specified timeZone. If the string contains time zone designators, matches up until the start of time zone designators.static func iso8601(timeZone: TimeZone, includingFractionalSeconds: Bool = false, dateSeparator: Date.ISO8601FormatStyle.DateSeparator = .dash, dateTimeSeparator: Date.ISO8601FormatStyle.DateTimeSeparator = .standard, timeSeparator: Date.ISO8601FormatStyle.TimeSeparator = .colon) -> Self
Parameters
timeZoneThe time zone to create the captured
Datewith.includingFractionalSecondsSpecifies if the string contains fractional seconds.
dateSeparatorThe separator between date components.
dateTimeSeparatorThe separator between date and time parts.
timeSeparatorThe separator between time components.
Return Value
A RegexComponent to match an ISO 8601 string.