 
     func testDecodeDate() {
         let dateFormatter = DateFormatter()
-        dateFormatter.dateFormat = "yyyy-MM-dd"
-        let stringDate = "2018-05-30"
+        dateFormatter.calendar = Calendar(identifier: .iso8601)
+        dateFormatter.locale = Locale(identifier: "en_US_POSIX")
+        dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
+        let stringDate = "2018-05-17T18:45:32.189Z"
         let date = dateFormatter.date(from: stringDate)
 
-        let json = "{ \"key\": 2018-05-30 }"
-        let data = json.data(using: .utf8)!
-        let object = try! JSONDecoder().decode([String: JSON].self, from: data)
-        XCTAssertEqual(object["key"], .date(date))
+        let json = "{ \"key\": \"17 May 2018 at 19:45\" }"
+        let data = json.data(using: .utf8)!
+        let object = try! JSONDecoder().decode([String: JSON].self, from: data)
+        XCTAssertEqual(object["key"], JSON.date(date!))
     }
 
     func testDecodeString() {

        XCTAssertNotEqual(JSON.int(1), JSON.int(2))
        XCTAssertNotEqual(JSON.double(3.14), JSON.double(2.72))
        XCTAssertNotEqual(JSON.double(3.14), JSON.double(2.72))
        XCTAssertNotEqual(JSON.date(date), JSON.date(date2))
        XCTAssertNotEqual(JSON.array([JSON.int(1), JSON.int(2)]),
                          JSON.array([JSON.int(2), JSON.int(1)]))
        XCTAssertNotEqual(JSON.object(["x": JSON.int(1), "y": JSON.int(2)]),

        XCTAssertNotEqual(JSON.boolean(true), JSON.string("true"))
        XCTAssertNotEqual(JSON.string("true"), JSON.int(1))
        XCTAssertNotEqual(JSON.int(1), JSON.double(1.0))
        XCTAssertNotEqual(JSON.string("true"), JSON.date(date!))
        XCTAssertNotEqual(JSON.double(1.0), JSON.array([JSON.double(1.0)]))
        XCTAssertNotEqual(JSON.array([JSON.double(1.0)]),
                          JSON.object(["x": JSON.double(1.0)]))
