Skip to content

Commit fe71782

Browse files
committed
drop iso date format
1 parent b692641 commit fe71782

File tree

3 files changed

+0
-19
lines changed

3 files changed

+0
-19
lines changed

Sources/ElasticsearchQueryBuilder/Encoding.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff 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:

Sources/ElasticsearchQueryBuilder/QueryValue.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ public enum QueryValue: Equatable {
1212
}
1313

1414
public 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).

Tests/ElasticsearchQueryBuilderTests/EncodingTests.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff 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),

0 commit comments

Comments
 (0)