Skip to content

Commit 97adefc

Browse files
committed
wip
1 parent 0650039 commit 97adefc

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Sources/StructuredQueriesCore/QueryRepresentable/Date+ISO8601.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ extension Date {
1616
public struct ISO8601Representation: QueryRepresentable {
1717
public var queryOutput: Date
1818

19+
public var iso8601String: String {
20+
queryOutput.iso8601String
21+
}
22+
1923
public init(queryOutput: Date) {
2024
self.queryOutput = queryOutput
2125
}
26+
27+
public init(iso8601String: String) throws {
28+
try self.init(queryOutput: Date(iso8601String: iso8601String))
29+
}
2230
}
2331
}
2432

0 commit comments

Comments
 (0)