AnyDateFormatter
public protocol AnyDateFormatter
Protocol acting as a common API for all types of date formatters,
such as DateFormatter
and ISO8601DateFormatter
.
-
Format a string into a date
Declaration
Swift
func date(from string: String) -> Date?
-
Format a date into a string
Declaration
Swift
func string(from date: Date) -> String