Instance MethodFoundationInternationalization
parse(_:)
iOS 15.0+
iPadOS 15.0+
Mac Catalyst 15.0+
macOS 12.0+
tvOS 15.0+
watchOS 8.0+
Returns a
Date of a given string interpreted using the current settings.func parse(_ value: String) throws -> Date
Parameters
valueA string representation of a date.
Return Value
A Date represented by value.
Discussion
Throws
Throws NSFormattingError if the string cannot be parsed.