PolarPlainDate
public struct PolarPlainDate
extension PolarPlainDate: CustomStringConvertible
extension PolarPlainDate: ExpressibleByStringLiteral
extension PolarPlainDate: Decodable
extension PolarPlainDate: Encodable
Undocumented
-
Returns a date string initialized using their ISO 8601 representation.
Declaration
Swift
public init?(from dateAsString: String, calendar: Calendar = .current)Parameters
dateAsStringThe ISO 8601 representation of the date. For instance,
2022-03-02for March 2nd of 2022.calendarThe calendar — including the time zone — to use. The default is the current calendar.
Return Value
A date string, or
nilif a valid date could not be created fromdateAsString. -
Returns a date string initialized using their ISO 8601 representation.
Declaration
Swift
public init(date: Date, calendar: Calendar = .current)Parameters
dateThe date to represent.
calendarThe calendar — including the time zone — to use. The default is the current calendar.
-
A string description of the
PlainDatein ISO 8601 format.Declaration
Swift
public var description: String { get } -
Declaration
Swift
public init(stringLiteral value: String) -
Declaration
Swift
public init(from decoder: Decoder) throws -
Declaration
Swift
public func encode(to encoder: Encoder) throws