File tree Expand file tree Collapse file tree 3 files changed +0
-19
lines changed
Sources/ElasticsearchQueryBuilder
Tests/ElasticsearchQueryBuilderTests Expand file tree Collapse file tree 3 files changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ extension QueryValue: Encodable {
88 try container. encode ( value)
99 case let . date( value, format: format) :
1010 switch format {
11- case . iso8601:
12- try container. encode ( value. formatted ( . iso8601) )
1311 case . secondsSince1970:
1412 try container. encode ( String ( describing: Int ( value. timeIntervalSince1970) ) )
1513 case . millisecondsSince1970:
Original file line number Diff line number Diff line change @@ -12,8 +12,6 @@ public enum QueryValue: Equatable {
1212}
1313
1414public enum QueryDateFormat {
15- /// Encode the `Date` as an ISO-8601-formatted string (in RFC 3339 format).
16- case iso8601
1715 /// Encode the `Date` as a UNIX timestamp (as a JSON string).
1816 case secondsSince1970
1917 /// Encode the `Date` as UNIX millisecond timestamp (as a JSON string).
Original file line number Diff line number Diff line change @@ -33,21 +33,6 @@ final class EncodingTests: XCTestCase {
3333
3434 let date = Date ( timeIntervalSince1970: 1001.12345 )
3535
36- func test_date_iso8601( ) throws {
37- try assertFormattedDate (
38- . date( date, format: . iso8601) ,
39- """
40- " 1970-01-01T00:16:41Z "
41- """
42- )
43- try assertFormattedDate (
44- date,
45- dateEncodingStrategy: . iso8601,
46- """
47- " 1970-01-01T00:16:41Z "
48- """
49- )
50- }
5136 func test_date_secondsSince1970( ) throws {
5237 try assertFormattedDate (
5338 . date( date, format: . secondsSince1970) ,
You can’t perform that action at this time.
0 commit comments