From d3a82a85818c7d982a531461862b8f27a2709812 Mon Sep 17 00:00:00 2001 From: Jordan Kay Date: Thu, 27 Jan 2022 10:23:38 -0500 Subject: [PATCH] Remove explicit calls to init --- Tests/SwiftDateTests/TestSwiftDate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/SwiftDateTests/TestSwiftDate.swift b/Tests/SwiftDateTests/TestSwiftDate.swift index 49ddc057..b8daf87a 100644 --- a/Tests/SwiftDateTests/TestSwiftDate.swift +++ b/Tests/SwiftDateTests/TestSwiftDate.swift @@ -31,12 +31,12 @@ class TestSwiftDate: XCTestCase { // DO NOT recognized the right timezone // The timezone should be UTC let wrongZone = "2020-03-13T05:40:48.000Z" - let wrongZoneDate = Date.init(wrongZone) + let wrongZoneDate = Date(wrongZone) print(wrongZoneDate!.description) XCTAssert("2020-03-13 05:40:48 +0000" == wrongZoneDate!.description) let iso8601Time = "2020-03-13T05:40:48+00:00" - let iso8601Date = Date.init(iso8601Time) + let iso8601Date = Date(iso8601Time) print(iso8601Date!.description) XCTAssert("2020-03-13 05:40:48 +0000" == iso8601Date!.description) }