diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDETemplateMacros.plist b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDETemplateMacros.plist new file mode 100644 index 0000000..2a6fb1e --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDETemplateMacros.plist @@ -0,0 +1,11 @@ + + + + + FILEHEADER + +// Created on ___DATE___. +// ___COPYRIGHT___ +// + + diff --git a/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/.swiftpm/xcode/xcshareddata/xcschemes/Solar.xcscheme b/.swiftpm/xcode/xcshareddata/xcschemes/Solar.xcscheme new file mode 100644 index 0000000..2bd28fe --- /dev/null +++ b/.swiftpm/xcode/xcshareddata/xcschemes/Solar.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..a751ff8 --- /dev/null +++ b/Package.swift @@ -0,0 +1,17 @@ +// swift-tools-version:5.2 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Solar", + platforms: [.iOS(.v8), .macOS(.v10_15), .watchOS(.v4), .tvOS(.v11)], + products: [ + .library(name: "Solar", type: .dynamic, targets: ["Solar"]), + ], + dependencies: [], + targets: [ + .target(name: "Solar", path: "Solar"), + .testTarget(name: "Solar Tests", dependencies: ["Solar"], path: "Solar iOSTests"), + ] +) diff --git a/README.md b/README.md index 147e106..f3d9920 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ # Solar -[![Version](https://img.shields.io/cocoapods/v/Solar.svg?style=flat)](http://cocoapods.org/pods/Solar) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/ceeK/Solar.svg?branch=master)](https://travis-ci.org/ceeK/Solar) - [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/hyperium/hyper/master/LICENSE) +[![Version](https://img.shields.io/cocoapods/v/Solar.svg?style=flat)](http://cocoapods.org/pods/Solar) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![POD compatible](https://img.shields.io/badge/Cocoapods-compatible-4BC51D.svg?style=flat)](https://cocoapods.org) [![SPM compatible](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)](https://swift.org/package-manager/) [![Build Status](https://travis-ci.org/ceeK/Solar.svg?branch=master)](https://travis-ci.org/ceeK/Solar) +[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/hyperium/hyper/master/LICENSE) A Swift helper for generating Sunrise and Sunset times. diff --git a/Solar iOSTests/CorrectResults.json b/Solar iOSTests/CorrectResults.json deleted file mode 100644 index 56c47bf..0000000 --- a/Solar iOSTests/CorrectResults.json +++ /dev/null @@ -1,1423 +0,0 @@ - [{ - "city": "Abu Dhabi", - "latitude": 24.46667, - "longitude": 54.36667, - "sunrise": "2017-02-09T02:59:40+00:00", - "sunset": "2017-02-09T14:13:47+00:00" - }, { - "city": "Abuja", - "latitude": 9.05735, - "longitude": 7.48976, - "sunrise": "2017-02-09T05:50:01+00:00", - "sunset": "2017-02-09T17:38:27+00:00" - }, { - "city": "Accra", - "latitude": 5.55602, - "longitude": -0.1969, - "sunrise": "2017-02-09T06:17:09+00:00", - "sunset": "2017-02-09T18:12:49+00:00" - }, { - "city": "Adamstown", - "latitude": -25.06597, - "longitude": -130.10147, - "sunrise": "2017-02-09T14:23:26+00:00", - "sunset": "2017-02-10T03:25:47+00:00" - }, { - "city": "Addis Ababa", - "latitude": 9.02497, - "longitude": 38.74689, - "sunrise": "2017-02-09T03:44:59+00:00", - "sunset": "2017-02-09T15:33:26+00:00" - }, { - "city": "Algiers", - "latitude": 36.7525, - "longitude": 3.04197, - "sunrise": "2017-02-09T06:41:38+00:00", - "sunset": "2017-02-09T17:22:25+00:00" - }, { - "city": "Alofi", - "latitude": -19.05952, - "longitude": -169.91867, - "sunrise": "2017-02-09T17:10:04+00:00", - "sunset": "2017-02-10T05:57:41+00:00" - }, { - "city": "Amman", - "latitude": 31.95522, - "longitude": 35.94503, - "sunrise": "2017-02-09T04:23:02+00:00", - "sunset": "2017-02-09T15:17:47+00:00" - }, { - "city": "Amsterdam", - "latitude": 52.37403, - "longitude": 4.88969, - "sunrise": "2017-02-09T07:06:08+00:00", - "sunset": "2017-02-09T16:43:09+00:00" - }, { - "city": "Andorra la Vella", - "latitude": 42.50779, - "longitude": 1.52109, - "sunrise": "2017-02-09T06:57:28+00:00", - "sunset": "2017-02-09T17:18:45+00:00" - }, { - "city": "Ankara", - "latitude": 39.91987, - "longitude": 32.85427, - "sunrise": "2017-02-09T04:47:39+00:00", - "sunset": "2017-02-09T15:17:54+00:00" - }, { - "city": "Antananarivo", - "latitude": -18.91433, - "longitude": 47.53098, - "sunrise": "2017-02-09T02:40:08+00:00", - "sunset": "2017-02-09T15:28:00+00:00" - }, { - "city": "Apia", - "latitude": -13.83333, - "longitude": -171.76666, - "sunrise": "2017-02-09T17:23:21+00:00", - "sunset": "2017-02-10T05:59:12+00:00" - }, { - "city": "Ashgabat", - "latitude": 37.95, - "longitude": 58.38333, - "sunrise": "2017-02-09T03:02:20+00:00", - "sunset": "2017-02-09T13:38:59+00:00" - }, { - "city": "Asmara", - "latitude": 15.33333, - "longitude": 38.93333, - "sunrise": "2017-02-09T03:50:56+00:00", - "sunset": "2017-02-09T15:25:59+00:00" - }, { - "city": "Astana", - "latitude": 51.1801, - "longitude": 71.44598, - "sunrise": "2017-02-09T02:37:03+00:00", - "sunset": "2017-02-09T12:19:47+00:00" - }, { - "city": "Asunci??n", - "latitude": -25.30066, - "longitude": -57.63591, - "sunrise": "2017-02-09T09:33:08+00:00", - "sunset": "2017-02-09T22:36:22+00:00" - }, { - "city": "Athens", - "latitude": 37.97945, - "longitude": 23.71622, - "sunrise": "2017-02-09T05:20:57+00:00", - "sunset": "2017-02-09T15:57:43+00:00" - }, { - "city": "Avarua", - "latitude": -21.20778, - "longitude": -159.775, - "sunrise": "2017-02-09T16:26:57+00:00", - "sunset": "2017-02-10T05:19:39+00:00" - }, { - "city": "Baghdad", - "latitude": 33.34058, - "longitude": 44.40088, - "sunrise": "2017-02-09T03:51:12+00:00", - "sunset": "2017-02-09T14:41:59+00:00" - }, { - "city": "Baku", - "latitude": 40.37767, - "longitude": 49.89201, - "sunrise": "2017-02-09T03:40:20+00:00", - "sunset": "2017-02-09T14:08:55+00:00" - }, { - "city": "Bamako", - "latitude": 12.65, - "longitude": -8, - "sunrise": "2017-02-09T06:55:45+00:00", - "sunset": "2017-02-09T18:36:39+00:00" - }, { - "city": "Bandar Seri Begawan", - "latitude": 4.94029, - "longitude": 114.94806, - "sunrise": "2017-02-08T22:35:58+00:00", - "sunset": "2017-02-09T10:32:50+00:00" - }, { - "city": "Bangkok", - "latitude": 13.75, - "longitude": 100.51667, - "sunrise": "2017-02-08T23:42:57+00:00", - "sunset": "2017-02-09T11:21:18+00:00" - }, { - "city": "Bangui", - "latitude": 4.36122, - "longitude": 18.55496, - "sunrise": "2017-02-09T05:00:55+00:00", - "sunset": "2017-02-09T16:59:02+00:00" - }, { - "city": "Banjul", - "latitude": 13.45274, - "longitude": -16.57803, - "sunrise": "2017-02-09T07:30:54+00:00", - "sunset": "2017-02-09T19:10:07+00:00" - }, { - "city": "Basseterre", - "latitude": 17.29484, - "longitude": -62.7261, - "sunrise": "2017-02-09T10:39:37+00:00", - "sunset": "2017-02-09T22:10:36+00:00" - }, { - "city": "Basse-Terre", - "latitude": 15.99854, - "longitude": -61.72548, - "sunrise": "2017-02-09T10:34:11+00:00", - "sunset": "2017-02-09T22:08:01+00:00" - }, { - "city": "Beijing", - "latitude": 39.9075, - "longitude": 116.39723, - "sunrise": "2017-02-08T23:13:43+00:00", - "sunset": "2017-02-09T09:43:29+00:00" - }, { - "city": "Beirut", - "latitude": 33.88894, - "longitude": 35.49442, - "sunrise": "2017-02-09T04:27:36+00:00", - "sunset": "2017-02-09T15:16:50+00:00" - }, { - "city": "Belgrade", - "latitude": 44.80401, - "longitude": 20.46513, - "sunrise": "2017-02-09T05:46:11+00:00", - "sunset": "2017-02-09T15:58:29+00:00" - }, { - "city": "Belmopan", - "latitude": 17.25, - "longitude": -88.76667, - "sunrise": "2017-02-09T12:23:42+00:00", - "sunset": "2017-02-09T23:54:50+00:00" - }, { - "city": "Berlin", - "latitude": 52.52437, - "longitude": 13.41053, - "sunrise": "2017-02-09T06:32:30+00:00", - "sunset": "2017-02-09T16:08:36+00:00" - }, { - "city": "Bern", - "latitude": 46.94809, - "longitude": 7.44744, - "sunrise": "2017-02-09T06:42:41+00:00", - "sunset": "2017-02-09T16:46:08+00:00" - }, { - "city": "Bishkek", - "latitude": 42.87306, - "longitude": 74.60028, - "sunrise": "2017-02-09T02:06:06+00:00", - "sunset": "2017-02-09T12:25:29+00:00" - }, { - "city": "Bissau", - "latitude": 11.85, - "longitude": -15.58333, - "sunrise": "2017-02-09T07:25:13+00:00", - "sunset": "2017-02-09T19:07:50+00:00" - }, { - "city": "Bogot?�", - "latitude": 4.60971, - "longitude": -74.08175, - "sunrise": "2017-02-09T11:11:42+00:00", - "sunset": "2017-02-09T23:09:21+00:00" - }, { - "city": "Bras??lia", - "latitude": -15.77972, - "longitude": -47.92972, - "sunrise": "2017-02-09T09:05:42+00:00", - "sunset": "2017-02-09T21:46:08+00:00" - }, { - "city": "Bratislava", - "latitude": 48.14816, - "longitude": 17.10674, - "sunrise": "2017-02-09T06:06:45+00:00", - "sunset": "2017-02-09T16:04:47+00:00" - }, { - "city": "Brazzaville", - "latitude": -4.2669, - "longitude": 15.28327, - "sunrise": "2017-02-09T05:05:09+00:00", - "sunset": "2017-02-09T17:20:59+00:00" - }, { - "city": "Bridgetown", - "latitude": 13.1, - "longitude": -59.61667, - "sunrise": "2017-02-09T10:22:39+00:00", - "sunset": "2017-02-09T22:02:41+00:00" - }, { - "city": "Brussels", - "latitude": 50.85045, - "longitude": 4.34878, - "sunrise": "2017-02-09T07:04:15+00:00", - "sunset": "2017-02-09T16:49:21+00:00" - }, { - "city": "Bucure�?ti", - "latitude": 44.43225, - "longitude": 26.10626, - "sunrise": "2017-02-09T05:22:54+00:00", - "sunset": "2017-02-09T15:36:38+00:00" - }, { - "city": "Budapest", - "latitude": 47.49801, - "longitude": 19.03991, - "sunrise": "2017-02-09T05:57:34+00:00", - "sunset": "2017-02-09T15:58:30+00:00" - }, { - "city": "Buenos Aires", - "latitude": -34.61315, - "longitude": -58.37723, - "sunrise": "2017-02-09T09:22:49+00:00", - "sunset": "2017-02-09T22:52:36+00:00" - }, { - "city": "Bujumbura", - "latitude": -3.37611, - "longitude": 29.36, - "sunrise": "2017-02-09T04:09:45+00:00", - "sunset": "2017-02-09T16:23:45+00:00" - }, { - "city": "Cairo", - "latitude": 30.06263, - "longitude": 31.24967, - "sunrise": "2017-02-09T04:39:14+00:00", - "sunset": "2017-02-09T15:39:10+00:00" - }, { - "city": "Canberra", - "latitude": -35.28346, - "longitude": 149.12807, - "sunrise": "2017-02-08T19:31:08+00:00", - "sunset": "2017-02-09T09:04:13+00:00" - }, { - "city": "Caracas", - "latitude": 10.5, - "longitude": -66.91667, - "sunrise": "2017-02-09T10:49:06+00:00", - "sunset": "2017-02-09T22:34:37+00:00" - }, { - "city": "Castries", - "latitude": 13.9957, - "longitude": -61.00614, - "sunrise": "2017-02-09T10:29:09+00:00", - "sunset": "2017-02-09T22:07:17+00:00" - }, { - "city": "Cayenne", - "latitude": 4.93333, - "longitude": -52.33333, - "sunrise": "2017-02-09T09:45:02+00:00", - "sunset": "2017-02-09T21:42:01+00:00" - }, { - "city": "Charlotte Amalie", - "latitude": 18.3419, - "longitude": -64.9307, - "sunrise": "2017-02-09T10:49:35+00:00", - "sunset": "2017-02-09T22:18:16+00:00" - }, { - "city": "Chi�?in��u", - "latitude": 47.00556, - "longitude": 28.8575, - "sunrise": "2017-02-09T05:17:15+00:00", - "sunset": "2017-02-09T15:20:16+00:00" - }, { - "city": "Cockburn Town", - "latitude": 21.46122, - "longitude": -71.14188, - "sunrise": "2017-02-09T11:17:57+00:00", - "sunset": "2017-02-09T22:39:35+00:00" - }, { - "city": "Colombo", - "latitude": 6.93194, - "longitude": 79.84778, - "sunrise": "2017-02-09T00:58:25+00:00", - "sunset": "2017-02-09T12:51:11+00:00" - }, { - "city": "Conakry", - "latitude": 9.53795, - "longitude": -13.67729, - "sunrise": "2017-02-09T07:15:11+00:00", - "sunset": "2017-02-09T19:02:38+00:00" - }, { - "city": "Copenhagen", - "latitude": 55.67594, - "longitude": 12.56553, - "sunrise": "2017-02-09T06:45:21+00:00", - "sunset": "2017-02-09T16:02:31+00:00" - }, { - "city": "Dakar", - "latitude": 14.6937, - "longitude": -17.44406, - "sunrise": "2017-02-09T07:35:42+00:00", - "sunset": "2017-02-09T19:12:15+00:00" - }, { - "city": "Damascus", - "latitude": 33.5102, - "longitude": 36.29128, - "sunrise": "2017-02-09T04:23:52+00:00", - "sunset": "2017-02-09T15:14:12+00:00" - }, { - "city": "Dhaka", - "latitude": 23.7104, - "longitude": 90.40744, - "sunrise": "2017-02-09T00:34:39+00:00", - "sunset": "2017-02-09T11:50:28+00:00" - }, { - "city": "Dili", - "latitude": -8.55861, - "longitude": 125.57361, - "sunrise": "2017-02-08T21:39:25+00:00", - "sunset": "2017-02-09T10:04:22+00:00" - }, { - "city": "Djibouti", - "latitude": 11.58767, - "longitude": 43.14468, - "sunrise": "2017-02-09T03:30:05+00:00", - "sunset": "2017-02-09T15:13:09+00:00" - }, { - "city": "Dodoma", - "latitude": -6.17486, - "longitude": 35.73792, - "sunrise": "2017-02-09T03:41:20+00:00", - "sunset": "2017-02-09T16:01:09+00:00" - }, { - "city": "Doha", - "latitude": 25.27932, - "longitude": 51.52245, - "sunrise": "2017-02-09T03:12:02+00:00", - "sunset": "2017-02-09T14:24:10+00:00" - }, { - "city": "Douglas", - "latitude": 54.15, - "longitude": -4.48333, - "sunrise": "2017-02-09T07:48:40+00:00", - "sunset": "2017-02-09T17:15:35+00:00" - }, { - "city": "Dublin", - "latitude": 53.34399, - "longitude": -6.26719, - "sunrise": "2017-02-09T07:53:26+00:00", - "sunset": "2017-02-09T17:25:06+00:00" - }, { - "city": "Dushanbe", - "latitude": 38.53575, - "longitude": 68.77905, - "sunrise": "2017-02-09T02:21:44+00:00", - "sunset": "2017-02-09T12:56:25+00:00" - }, { - "city": "Flying Fish Cove", - "latitude": -10.42172, - "longitude": 105.67912, - "sunrise": "2017-02-08T22:57:01+00:00", - "sunset": "2017-02-09T11:25:56+00:00" - }, { - "city": "Fort-de-France", - "latitude": 14.60892, - "longitude": -61.07334, - "sunrise": "2017-02-09T10:30:05+00:00", - "sunset": "2017-02-09T22:06:54+00:00" - }, { - "city": "Freetown", - "latitude": 8.484, - "longitude": -13.22994, - "sunrise": "2017-02-09T07:12:18+00:00", - "sunset": "2017-02-09T19:01:56+00:00" - }, { - "city": "Funafuti", - "latitude": -8.52425, - "longitude": 179.19417, - "sunrise": "2017-02-08T18:04:57+00:00", - "sunset": "2017-02-09T06:29:53+00:00" - }, { - "city": "Gaborone", - "latitude": -24.65451, - "longitude": 25.90859, - "sunrise": "2017-02-09T03:59:37+00:00", - "sunset": "2017-02-09T17:01:30+00:00" - }, { - "city": "George Town", - "latitude": 19.28692, - "longitude": -81.36706, - "sunrise": "2017-02-09T11:56:22+00:00", - "sunset": "2017-02-09T23:22:58+00:00" - }, { - "city": "Georgetown", - "latitude": 6.80448, - "longitude": -58.15527, - "sunrise": "2017-02-09T10:10:15+00:00", - "sunset": "2017-02-09T22:03:24+00:00" - }, { - "city": "Gibraltar", - "latitude": 36.14474, - "longitude": -5.35257, - "sunrise": "2017-02-09T07:14:15+00:00", - "sunset": "2017-02-09T17:56:58+00:00" - }, { - "city": "Grytviken", - "latitude": -54.28111, - "longitude": -36.5092, - "sunrise": "2017-02-09T07:10:34+00:00", - "sunset": "2017-02-09T22:09:54+00:00" - }, { - "city": "Guatemala City", - "latitude": 14.64072, - "longitude": -90.51327, - "sunrise": "2017-02-09T12:27:51+00:00", - "sunset": "2017-02-10T00:04:39+00:00" - }, { - "city": "Gustavia", - "latitude": 17.89618, - "longitude": -62.84978, - "sunrise": "2017-02-09T10:40:46+00:00", - "sunset": "2017-02-09T22:10:26+00:00" - }, { - "city": "H?� N��?i", - "latitude": 21.0245, - "longitude": 105.84117, - "sunrise": "2017-02-08T23:29:46+00:00", - "sunset": "2017-02-09T10:51:53+00:00" - }, { - "city": "Hag?�t?�a", - "latitude": 13.47417, - "longitude": 144.74778, - "sunrise": "2017-02-08T20:45:46+00:00", - "sunset": "2017-02-09T08:24:38+00:00" - }, { - "city": "Hamilton", - "latitude": 32.29149, - "longitude": -64.77797, - "sunrise": "2017-02-09T11:06:10+00:00", - "sunset": "2017-02-09T22:00:27+00:00" - }, { - "city": "Harare", - "latitude": -17.82935, - "longitude": 31.05389, - "sunrise": "2017-02-09T03:47:20+00:00", - "sunset": "2017-02-09T16:32:37+00:00" - }, { - "city": "Havana", - "latitude": 23.13302, - "longitude": -82.38304, - "sunrise": "2017-02-09T12:04:51+00:00", - "sunset": "2017-02-09T23:22:37+00:00" - }, { - "city": "Helsinki", - "latitude": 60.16952, - "longitude": 24.93545, - "sunrise": "2017-02-09T06:12:49+00:00", - "sunset": "2017-02-09T14:56:06+00:00" - }, { - "city": "Hong Kong", - "latitude": 22.28552, - "longitude": 114.15769, - "sunrise": "2017-02-08T22:58:00+00:00", - "sunset": "2017-02-09T10:17:08+00:00" - }, { - "city": "Honiara", - "latitude": -9.43333, - "longitude": 159.95, - "sunrise": "2017-02-08T19:20:58+00:00", - "sunset": "2017-02-09T07:47:49+00:00" - }, { - "city": "Isl��m��b��d", - "latitude": 33.72148, - "longitude": 73.04329, - "sunrise": "2017-02-09T01:57:15+00:00", - "sunset": "2017-02-09T12:46:47+00:00" - }, { - "city": "Jakarta", - "latitude": -6.21462, - "longitude": 106.84513, - "sunrise": "2017-02-08T22:56:50+00:00", - "sunset": "2017-02-09T11:16:47+00:00" - }, { - "city": "Jamestown", - "latitude": -15.93872, - "longitude": -5.71675, - "sunrise": "2017-02-09T06:16:38+00:00", - "sunset": "2017-02-09T18:57:30+00:00" - }, { - "city": "Kabul", - "latitude": 34.52813, - "longitude": 69.17233, - "sunrise": "2017-02-09T02:13:55+00:00", - "sunset": "2017-02-09T13:01:06+00:00" - }, { - "city": "Kampala", - "latitude": 0.31628, - "longitude": 32.58219, - "sunrise": "2017-02-09T04:00:40+00:00", - "sunset": "2017-02-09T16:07:04+00:00" - }, { - "city": "Kathmandu", - "latitude": 27.70169, - "longitude": 85.3206, - "sunrise": "2017-02-09T00:59:57+00:00", - "sunset": "2017-02-09T12:05:52+00:00" - }, { - "city": "Khartoum", - "latitude": 15.54665, - "longitude": 32.53361, - "sunrise": "2017-02-09T04:16:46+00:00", - "sunset": "2017-02-09T15:51:22+00:00" - }, { - "city": "Kiev", - "latitude": 50.45466, - "longitude": 30.5238, - "sunrise": "2017-02-09T05:18:40+00:00", - "sunset": "2017-02-09T15:05:32+00:00" - }, { - "city": "Kigali", - "latitude": -1.94995, - "longitude": 30.05885, - "sunrise": "2017-02-09T04:08:26+00:00", - "sunset": "2017-02-09T16:19:29+00:00" - }, { - "city": "Kingston", - "latitude": -29.05459, - "longitude": 167.96628, - "sunrise": "2017-02-08T18:25:11+00:00", - "sunset": "2017-02-09T07:39:28+00:00" - }, { - "city": "Kingston", - "latitude": 17.99702, - "longitude": -76.79358, - "sunrise": "2017-02-09T11:36:38+00:00", - "sunset": "2017-02-09T23:06:07+00:00" - }, { - "city": "Kingstown", - "latitude": 13.15872, - "longitude": -61.22475, - "sunrise": "2017-02-09T10:29:08+00:00", - "sunset": "2017-02-09T22:09:03+00:00" - }, { - "city": "Kinshasa", - "latitude": -4.32459, - "longitude": 15.32146, - "sunrise": "2017-02-09T05:04:56+00:00", - "sunset": "2017-02-09T17:20:53+00:00" - }, { - "city": "Kuala Lumpur", - "latitude": 3.1412, - "longitude": 101.68653, - "sunrise": "2017-02-08T23:27:09+00:00", - "sunset": "2017-02-09T11:27:44+00:00" - }, { - "city": "Kuwait", - "latitude": 29.36972, - "longitude": 47.97833, - "sunrise": "2017-02-09T03:31:26+00:00", - "sunset": "2017-02-09T14:33:08+00:00" - }, { - "city": "La Paz", - "latitude": -16.5, - "longitude": -68.15, - "sunrise": "2017-02-09T10:25:48+00:00", - "sunset": "2017-02-09T23:07:48+00:00" - }, { - "city": "Libreville", - "latitude": 0.38333, - "longitude": 9.45, - "sunrise": "2017-02-09T05:33:16+00:00", - "sunset": "2017-02-09T17:39:32+00:00" - }, { - "city": "Lilongwe", - "latitude": -13.98333, - "longitude": 33.78333, - "sunrise": "2017-02-09T03:40:46+00:00", - "sunset": "2017-02-09T16:17:21+00:00" - }, { - "city": "Lima", - "latitude": -12.04318, - "longitude": -77.02824, - "sunrise": "2017-02-09T11:06:15+00:00", - "sunset": "2017-02-09T23:38:23+00:00" - }, { - "city": "Lisbon", - "latitude": 38.71667, - "longitude": -9.13333, - "sunrise": "2017-02-09T07:33:27+00:00", - "sunset": "2017-02-09T18:08:01+00:00" - }, { - "city": "Ljubljana", - "latitude": 46.05108, - "longitude": 14.50513, - "sunrise": "2017-02-09T06:12:34+00:00", - "sunset": "2017-02-09T16:19:47+00:00" - }, { - "city": "Lom??", - "latitude": 6.13748, - "longitude": 1.21227, - "sunrise": "2017-02-09T06:12:07+00:00", - "sunset": "2017-02-09T18:06:35+00:00" - }, { - "city": "London", - "latitude": 51.50853, - "longitude": -0.12574, - "sunrise": "2017-02-09T07:23:50+00:00", - "sunset": "2017-02-09T17:05:34+00:00" - }, { - "city": "Luanda", - "latitude": -8.83833, - "longitude": 13.23444, - "sunrise": "2017-02-09T05:08:33+00:00", - "sunset": "2017-02-09T17:33:57+00:00" - }, { - "city": "Lusaka", - "latitude": -15.40809, - "longitude": 28.28636, - "sunrise": "2017-02-09T04:01:10+00:00", - "sunset": "2017-02-09T16:40:55+00:00" - }, { - "city": "Luxembourg", - "latitude": 49.61167, - "longitude": 6.13, - "sunrise": "2017-02-09T06:54:03+00:00", - "sunset": "2017-02-09T16:45:18+00:00" - }, { - "city": "Macau", - "latitude": 22.20056, - "longitude": 113.54611, - "sunrise": "2017-02-08T23:00:20+00:00", - "sunset": "2017-02-09T10:19:40+00:00" - }, { - "city": "Madrid", - "latitude": 40.4165, - "longitude": -3.70256, - "sunrise": "2017-02-09T07:14:37+00:00", - "sunset": "2017-02-09T17:43:24+00:00" - }, { - "city": "Majuro", - "latitude": 7.08971, - "longitude": 171.38027, - "sunrise": "2017-02-08T18:52:29+00:00", - "sunset": "2017-02-09T06:44:51+00:00" - }, { - "city": "Malabo", - "latitude": 3.75, - "longitude": 8.78333, - "sunrise": "2017-02-09T05:39:23+00:00", - "sunset": "2017-02-09T17:38:45+00:00" - }, { - "city": "Male", - "latitude": 4.1748, - "longitude": 73.50888, - "sunrise": "2017-02-09T01:20:55+00:00", - "sunset": "2017-02-09T13:19:23+00:00" - }, { - "city": "Mamoudzou", - "latitude": -12.77944, - "longitude": 45.22722, - "sunrise": "2017-02-09T02:56:19+00:00", - "sunset": "2017-02-09T15:30:15+00:00" - }, { - "city": "Managua", - "latitude": 12.13282, - "longitude": -86.2504, - "sunrise": "2017-02-09T12:08:08+00:00", - "sunset": "2017-02-09T23:50:16+00:00" - }, { - "city": "Manama", - "latitude": 26.21536, - "longitude": 50.5832, - "sunrise": "2017-02-09T03:16:57+00:00", - "sunset": "2017-02-09T14:26:46+00:00" - }, { - "city": "Manila", - "latitude": 14.6042, - "longitude": 120.9822, - "sunrise": "2017-02-08T22:22:02+00:00", - "sunset": "2017-02-09T09:58:30+00:00" - }, { - "city": "Maputo", - "latitude": -25.96528, - "longitude": 32.58917, - "sunrise": "2017-02-09T03:31:11+00:00", - "sunset": "2017-02-09T16:36:29+00:00" - }, { - "city": "Mariehamn", - "latitude": 60.09726, - "longitude": 19.93481, - "sunrise": "2017-02-09T06:32:28+00:00", - "sunset": "2017-02-09T15:16:27+00:00" - }, { - "city": "Marigot", - "latitude": 18.06667, - "longitude": -63.08333, - "sunrise": "2017-02-09T10:41:53+00:00", - "sunset": "2017-02-09T22:11:10+00:00" - }, { - "city": "Maseru", - "latitude": -29.31667, - "longitude": 27.48333, - "sunrise": "2017-02-09T03:47:04+00:00", - "sunset": "2017-02-09T17:01:28+00:00" - }, { - "city": "Mat?�'utu", - "latitude": -13.28163, - "longitude": -176.17453, - "sunrise": "2017-02-09T17:41:35+00:00", - "sunset": "2017-02-10T06:16:13+00:00" - }, { - "city": "Mbabane", - "latitude": -26.31667, - "longitude": 31.13333, - "sunrise": "2017-02-09T03:36:33+00:00", - "sunset": "2017-02-09T16:42:47+00:00" - }, { - "city": "Mexico City", - "latitude": 19.42847, - "longitude": -99.12766, - "sunrise": "2017-02-09T13:07:33+00:00", - "sunset": "2017-02-10T00:33:53+00:00" - }, { - "city": "Minsk", - "latitude": 53.9, - "longitude": 27.56667, - "sunrise": "2017-02-09T05:39:54+00:00", - "sunset": "2017-02-09T15:07:57+00:00" - }, { - "city": "Mogadishu", - "latitude": 2.03711, - "longitude": 45.34375, - "sunrise": "2017-02-09T03:11:23+00:00", - "sunset": "2017-02-09T15:14:15+00:00" - }, { - "city": "Monaco", - "latitude": 43.73333, - "longitude": 7.41667, - "sunrise": "2017-02-09T06:36:14+00:00", - "sunset": "2017-02-09T16:52:50+00:00" - }, { - "city": "Monrovia", - "latitude": 6.30054, - "longitude": -10.7969, - "sunrise": "2017-02-09T07:00:19+00:00", - "sunset": "2017-02-09T18:54:27+00:00" - }, { - "city": "Montevideo", - "latitude": -34.83346, - "longitude": -56.16735, - "sunrise": "2017-02-09T09:13:37+00:00", - "sunset": "2017-02-09T22:44:07+00:00" - }, { - "city": "Moroni", - "latitude": -11.70216, - "longitude": 43.25506, - "sunrise": "2017-02-09T03:05:23+00:00", - "sunset": "2017-02-09T15:36:58+00:00" - }, { - "city": "Moscow", - "latitude": 55.75222, - "longitude": 37.61556, - "sunrise": "2017-02-09T05:05:33+00:00", - "sunset": "2017-02-09T14:21:55+00:00" - }, { - "city": "Muscat", - "latitude": 23.61333, - "longitude": 58.59333, - "sunrise": "2017-02-09T02:41:45+00:00", - "sunset": "2017-02-09T13:57:54+00:00" - }, { - "city": "Nairobi", - "latitude": -1.28333, - "longitude": 36.81667, - "sunrise": "2017-02-09T03:42:05+00:00", - "sunset": "2017-02-09T15:51:46+00:00" - }, { - "city": "Nassau", - "latitude": 25.05823, - "longitude": -77.34306, - "sunrise": "2017-02-09T11:47:00+00:00", - "sunset": "2017-02-09T23:00:08+00:00" - }, { - "city": "Nay Pyi Taw", - "latitude": 19.745, - "longitude": 96.12972, - "sunrise": "2017-02-09T00:07:08+00:00", - "sunset": "2017-02-09T11:32:13+00:00" - }, { - "city": "N'Djamena", - "latitude": 12.11058, - "longitude": 15.03479, - "sunrise": "2017-02-09T05:23:03+00:00", - "sunset": "2017-02-09T17:05:04+00:00" - }, { - "city": "New Delhi", - "latitude": 28.63576, - "longitude": 77.22445, - "sunrise": "2017-02-09T01:33:32+00:00", - "sunset": "2017-02-09T12:37:03+00:00" - }, { - "city": "Ngerulmud", - "latitude": 7.50043, - "longitude": 134.62355, - "sunrise": "2017-02-08T21:19:56+00:00", - "sunset": "2017-02-09T09:11:28+00:00" - }, { - "city": "Niamey", - "latitude": 13.5125, - "longitude": 2.11178, - "sunrise": "2017-02-09T06:16:13+00:00", - "sunset": "2017-02-09T17:55:16+00:00" - }, { - "city": "Nicosia", - "latitude": 35.16667, - "longitude": 33.36667, - "sunrise": "2017-02-09T04:38:00+00:00", - "sunset": "2017-02-09T15:23:28+00:00" - }, { - "city": "Nouakchott", - "latitude": 18.10033, - "longitude": -15.94975, - "sunrise": "2017-02-09T07:33:27+00:00", - "sunset": "2017-02-09T19:02:32+00:00" - }, { - "city": "Noum??a", - "latitude": -22.27631, - "longitude": 166.4572, - "sunrise": "2017-02-08T18:40:11+00:00", - "sunset": "2017-02-09T07:36:32+00:00" - }, { - "city": "Nuku`alofa", - "latitude": -21.13333, - "longitude": -175.2, - "sunrise": "2017-02-09T17:28:46+00:00", - "sunset": "2017-02-10T06:21:15+00:00" - }, { - "city": "Nuuk", - "latitude": 64.18347, - "longitude": -51.72157, - "sunrise": "2017-02-09T11:38:57+00:00", - "sunset": "2017-02-09T19:43:13+00:00" - }, { - "city": "Oranjestad", - "latitude": 12.52398, - "longitude": -70.02703, - "sunrise": "2017-02-09T11:03:40+00:00", - "sunset": "2017-02-09T22:44:57+00:00" - }, { - "city": "Oslo", - "latitude": 59.91273, - "longitude": 10.74609, - "sunrise": "2017-02-09T07:08:22+00:00", - "sunset": "2017-02-09T15:54:03+00:00" - }, { - "city": "Ottawa", - "latitude": 45.41117, - "longitude": -75.69812, - "sunrise": "2017-02-09T12:11:42+00:00", - "sunset": "2017-02-09T22:22:17+00:00" - }, { - "city": "Ouagadougou", - "latitude": 12.36423, - "longitude": -1.53834, - "sunrise": "2017-02-09T06:29:36+00:00", - "sunset": "2017-02-09T18:11:06+00:00" - }, { - "city": "Pago Pago", - "latitude": -14.27806, - "longitude": -170.7025, - "sunrise": "2017-02-09T17:18:36+00:00", - "sunset": "2017-02-10T05:55:25+00:00" - }, { - "city": "Palikir - National Government Center", - "latitude": 6.92477, - "longitude": 158.16109, - "sunrise": "2017-02-08T19:45:11+00:00", - "sunset": "2017-02-09T07:37:54+00:00" - }, { - "city": "Panam?�", - "latitude": 8.9936, - "longitude": -79.51973, - "sunrise": "2017-02-09T11:37:57+00:00", - "sunset": "2017-02-09T23:26:37+00:00" - }, { - "city": "Papeete", - "latitude": -17.53333, - "longitude": -149.56667, - "sunrise": "2017-02-09T15:50:24+00:00", - "sunset": "2017-02-10T04:34:33+00:00" - }, { - "city": "Paramaribo", - "latitude": 5.86638, - "longitude": -55.16682, - "sunrise": "2017-02-09T09:57:20+00:00", - "sunset": "2017-02-09T21:52:24+00:00" - }, { - "city": "Paris", - "latitude": 48.85341, - "longitude": 2.3488, - "sunrise": "2017-02-09T07:07:21+00:00", - "sunset": "2017-02-09T17:02:15+00:00" - }, { - "city": "Philipsburg", - "latitude": 18.026, - "longitude": -63.04582, - "sunrise": "2017-02-09T10:41:42+00:00", - "sunset": "2017-02-09T22:11:04+00:00" - }, { - "city": "Phnom Penh", - "latitude": 11.56245, - "longitude": 104.91601, - "sunrise": "2017-02-08T23:23:01+00:00", - "sunset": "2017-02-09T11:06:03+00:00" - }, { - "city": "Plymouth", - "latitude": 16.70555, - "longitude": -62.21292, - "sunrise": "2017-02-09T10:36:55+00:00", - "sunset": "2017-02-09T22:09:11+00:00" - }, { - "city": "Podgorica", - "latitude": 42.44111, - "longitude": 19.26361, - "sunrise": "2017-02-09T05:46:27+00:00", - "sunset": "2017-02-09T16:07:50+00:00" - }, { - "city": "Port Louis", - "latitude": -20.16194, - "longitude": 57.49889, - "sunrise": "2017-02-09T01:58:46+00:00", - "sunset": "2017-02-09T14:49:37+00:00" - }, { - "city": "Port Moresby", - "latitude": -9.44314, - "longitude": 147.17972, - "sunrise": "2017-02-08T20:12:02+00:00", - "sunset": "2017-02-09T08:38:54+00:00" - }, { - "city": "Port-au-Prince", - "latitude": 18.53917, - "longitude": -72.335, - "sunrise": "2017-02-09T11:19:25+00:00", - "sunset": "2017-02-09T22:47:40+00:00" - }, { - "city": "Port-aux-Fran??ais", - "latitude": -49.35, - "longitude": 70.21667, - "sunrise": "2017-02-09T00:17:56+00:00", - "sunset": "2017-02-09T14:48:43+00:00" - }, { - "city": "Port-of-Spain", - "latitude": 10.66617, - "longitude": -61.51657, - "sunrise": "2017-02-09T10:27:41+00:00", - "sunset": "2017-02-09T22:12:51+00:00" - }, { - "city": "Porto-Novo", - "latitude": 6.49646, - "longitude": 2.60359, - "sunrise": "2017-02-09T06:06:55+00:00", - "sunset": "2017-02-09T18:00:39+00:00" - }, { - "city": "Port-Vila", - "latitude": -17.73381, - "longitude": 168.32188, - "sunrise": "2017-02-08T18:38:12+00:00", - "sunset": "2017-02-09T07:23:36+00:00" - }, { - "city": "Praha", - "latitude": 50.08804, - "longitude": 14.42076, - "sunrise": "2017-02-09T06:22:06+00:00", - "sunset": "2017-02-09T16:10:56+00:00" - }, { - "city": "Praia", - "latitude": 14.92148, - "longitude": -23.50868, - "sunrise": "2017-02-09T08:00:12+00:00", - "sunset": "2017-02-09T19:36:16+00:00" - }, { - "city": "Pretoria", - "latitude": -25.74486, - "longitude": 28.18783, - "sunrise": "2017-02-09T03:49:05+00:00", - "sunset": "2017-02-09T16:53:48+00:00" - }, { - "city": "Pristina", - "latitude": 42.67272, - "longitude": 21.16688, - "sunrise": "2017-02-09T05:39:16+00:00", - "sunset": "2017-02-09T15:59:47+00:00" - }, { - "city": "Pyongyang", - "latitude": 39.03385, - "longitude": 125.75432, - "sunrise": "2017-02-08T22:34:50+00:00", - "sunset": "2017-02-09T09:07:30+00:00" - }, { - "city": "Quito", - "latitude": -0.22985, - "longitude": -78.52495, - "sunrise": "2017-02-09T11:24:32+00:00", - "sunset": "2017-02-09T23:32:03+00:00" - }, { - "city": "Rabat", - "latitude": 34.01325, - "longitude": -6.83255, - "sunrise": "2017-02-09T07:16:59+00:00", - "sunset": "2017-02-09T18:06:04+00:00" - }, { - "city": "Reykjav??k", - "latitude": 64.13548, - "longitude": -21.89541, - "sunrise": "2017-02-09T09:39:38+00:00", - "sunset": "2017-02-09T17:43:56+00:00" - }, { - "city": "Riga", - "latitude": 56.946, - "longitude": 24.10589, - "sunrise": "2017-02-09T06:03:34+00:00", - "sunset": "2017-02-09T15:11:58+00:00" - }, { - "city": "Riyadh", - "latitude": 24.68773, - "longitude": 46.72185, - "sunrise": "2017-02-09T03:30:31+00:00", - "sunset": "2017-02-09T14:44:06+00:00" - }, { - "city": "Road Town", - "latitude": 18.41667, - "longitude": -64.61667, - "sunrise": "2017-02-09T10:48:25+00:00", - "sunset": "2017-02-09T22:16:55+00:00" - }, { - "city": "Roma", - "latitude": 41.89474, - "longitude": 12.4839, - "sunrise": "2017-02-09T06:12:32+00:00", - "sunset": "2017-02-09T16:35:59+00:00" - }, { - "city": "Roseau", - "latitude": 15.30174, - "longitude": -61.38808, - "sunrise": "2017-02-09T10:32:05+00:00", - "sunset": "2017-02-09T22:07:25+00:00" - }, { - "city": "S?�o Tom??", - "latitude": 0.33654, - "longitude": 6.72732, - "sunrise": "2017-02-09T05:44:06+00:00", - "sunset": "2017-02-09T17:50:28+00:00" - }, { - "city": "Saint George's", - "latitude": 12.05644, - "longitude": -61.74849, - "sunrise": "2017-02-09T10:30:04+00:00", - "sunset": "2017-02-09T22:12:19+00:00" - }, { - "city": "Saint Helier", - "latitude": 49.18333, - "longitude": -2.1, - "sunrise": "2017-02-09T07:25:54+00:00", - "sunset": "2017-02-09T17:19:17+00:00" - }, { - "city": "Saint John�??s", - "latitude": 17.11667, - "longitude": -61.85, - "sunrise": "2017-02-09T10:35:55+00:00", - "sunset": "2017-02-09T22:07:17+00:00" - }, { - "city": "Saint Peter Port", - "latitude": 49.45981, - "longitude": -2.53527, - "sunrise": "2017-02-09T07:28:18+00:00", - "sunset": "2017-02-09T17:20:22+00:00" - }, { - "city": "Saint-Denis", - "latitude": -20.88231, - "longitude": 55.4504, - "sunrise": "2017-02-09T02:06:06+00:00", - "sunset": "2017-02-09T14:58:41+00:00" - }, { - "city": "Saint-Pierre", - "latitude": 46.76544, - "longitude": -56.16949, - "sunrise": "2017-02-09T10:56:29+00:00", - "sunset": "2017-02-09T21:01:16+00:00" - }, { - "city": "San Jos??", - "latitude": 9.93333, - "longitude": -84.08333, - "sunrise": "2017-02-09T11:57:10+00:00", - "sunset": "2017-02-09T23:43:54+00:00" - }, { - "city": "San Juan", - "latitude": 18.46633, - "longitude": -66.10572, - "sunrise": "2017-02-09T10:54:25+00:00", - "sunset": "2017-02-09T22:22:49+00:00" - }, { - "city": "San Marino", - "latitude": 43.93333, - "longitude": 12.45, - "sunrise": "2017-02-09T06:16:30+00:00", - "sunset": "2017-02-09T16:32:17+00:00" - }, { - "city": "San Salvador", - "latitude": 13.68935, - "longitude": -89.18718, - "sunrise": "2017-02-09T12:21:32+00:00", - "sunset": "2017-02-10T00:00:22+00:00" - }, { - "city": "Sanaa", - "latitude": 15.35472, - "longitude": 44.20667, - "sunrise": "2017-02-09T03:29:52+00:00", - "sunset": "2017-02-09T15:04:52+00:00" - }, { - "city": "Santiago", - "latitude": -33.42628, - "longitude": -70.56656, - "sunrise": "2017-02-09T10:13:28+00:00", - "sunset": "2017-02-09T23:39:28+00:00" - }, { - "city": "Santo Domingo", - "latitude": 18.50012, - "longitude": -69.98857, - "sunrise": "2017-02-09T11:09:59+00:00", - "sunset": "2017-02-09T22:38:19+00:00" - }, { - "city": "Sarajevo", - "latitude": 43.84864, - "longitude": 18.35644, - "sunrise": "2017-02-09T05:52:44+00:00", - "sunset": "2017-02-09T16:08:48+00:00" - }, { - "city": "Seoul", - "latitude": 37.56826, - "longitude": 126.97783, - "sunrise": "2017-02-08T22:27:33+00:00", - "sunset": "2017-02-09T09:05:01+00:00" - }, { - "city": "Singapore", - "latitude": 1.28967, - "longitude": 103.85007, - "sunrise": "2017-02-08T23:16:36+00:00", - "sunset": "2017-02-09T11:20:59+00:00" - }, { - "city": "Skopje", - "latitude": 42, - "longitude": 21.43333, - "sunrise": "2017-02-09T05:36:58+00:00", - "sunset": "2017-02-09T15:59:58+00:00" - }, { - "city": "Sofia", - "latitude": 42.69751, - "longitude": 23.32415, - "sunrise": "2017-02-09T05:30:42+00:00", - "sunset": "2017-02-09T15:51:06+00:00" - }, { - "city": "Stanley", - "latitude": -51.7, - "longitude": -57.85, - "sunrise": "2017-02-09T08:44:14+00:00", - "sunset": "2017-02-09T23:26:58+00:00" - }, { - "city": "Stockholm", - "latitude": 59.33258, - "longitude": 18.0649, - "sunrise": "2017-02-09T06:36:44+00:00", - "sunset": "2017-02-09T15:27:09+00:00" - }, { - "city": "Sucre", - "latitude": -19.03332, - "longitude": -65.26274, - "sunrise": "2017-02-09T10:11:20+00:00", - "sunset": "2017-02-09T22:59:10+00:00" - }, { - "city": "Suva", - "latitude": -18.14161, - "longitude": 178.44149, - "sunrise": "2017-02-08T17:57:14+00:00", - "sunset": "2017-02-09T06:43:37+00:00" - }, { - "city": "T??rshavn", - "latitude": 62.00973, - "longitude": -6.77164, - "sunrise": "2017-02-09T08:27:53+00:00", - "sunset": "2017-02-09T16:54:41+00:00" - }, { - "city": "Taipei", - "latitude": 25.04776, - "longitude": 121.53185, - "sunrise": "2017-02-08T22:31:50+00:00", - "sunset": "2017-02-09T09:44:17+00:00" - }, { - "city": "Tallinn", - "latitude": 59.43696, - "longitude": 24.75353, - "sunrise": "2017-02-09T06:10:27+00:00", - "sunset": "2017-02-09T14:59:55+00:00" - }, { - "city": "Tarawa", - "latitude": 1.3278, - "longitude": 172.97696, - "sunrise": "2017-02-08T18:40:08+00:00", - "sunset": "2017-02-09T06:44:26+00:00" - }, { - "city": "Tashkent", - "latitude": 41.26465, - "longitude": 69.21627, - "sunrise": "2017-02-09T02:24:40+00:00", - "sunset": "2017-02-09T12:49:59+00:00" - }, { - "city": "Tbilisi", - "latitude": 41.69411, - "longitude": 44.83368, - "sunrise": "2017-02-09T04:02:53+00:00", - "sunset": "2017-02-09T14:26:50+00:00" - }, { - "city": "Tegucigalpa", - "latitude": 14.0818, - "longitude": -87.20681, - "sunrise": "2017-02-09T12:14:02+00:00", - "sunset": "2017-02-09T23:52:02+00:00" - }, { - "city": "Tehr��n", - "latitude": 35.69439, - "longitude": 51.42151, - "sunrise": "2017-02-09T03:26:37+00:00", - "sunset": "2017-02-09T14:10:24+00:00" - }, { - "city": "The Valley", - "latitude": 18.21704, - "longitude": -63.05783, - "sunrise": "2017-02-09T10:41:57+00:00", - "sunset": "2017-02-09T22:10:54+00:00" - }, { - "city": "Thimphu", - "latitude": 27.46609, - "longitude": 89.64191, - "sunrise": "2017-02-09T00:42:23+00:00", - "sunset": "2017-02-09T11:48:52+00:00" - }, { - "city": "Tirana", - "latitude": 41.3275, - "longitude": 19.81889, - "sunrise": "2017-02-09T05:42:12+00:00", - "sunset": "2017-02-09T16:07:38+00:00" - }, { - "city": "Tokyo", - "latitude": 35.61488, - "longitude": 139.5813, - "sunrise": "2017-02-08T21:34:06+00:00", - "sunset": "2017-02-09T08:17:38+00:00" - }, { - "city": "Tripoli", - "latitude": 32.87519, - "longitude": 13.18746, - "sunrise": "2017-02-09T05:55:19+00:00", - "sunset": "2017-02-09T16:47:35+00:00" - }, { - "city": "Tunis", - "latitude": 36.81897, - "longitude": 10.16579, - "sunrise": "2017-02-09T06:13:16+00:00", - "sunset": "2017-02-09T16:53:48+00:00" - }, { - "city": "Ulaanbaatar", - "latitude": 47.90771, - "longitude": 106.88324, - "sunrise": "2017-02-09T00:07:30+00:00", - "sunset": "2017-02-09T10:05:49+00:00" - }, { - "city": "Vaduz", - "latitude": 47.14151, - "longitude": 9.52154, - "sunrise": "2017-02-09T06:34:49+00:00", - "sunset": "2017-02-09T16:37:24+00:00" - }, { - "city": "Valletta", - "latitude": 35.89972, - "longitude": 14.51472, - "sunrise": "2017-02-09T05:54:28+00:00", - "sunset": "2017-02-09T16:37:49+00:00" - }, { - "city": "Vatican City", - "latitude": 41.90236, - "longitude": 12.45332, - "sunrise": "2017-02-09T06:12:40+00:00", - "sunset": "2017-02-09T16:36:05+00:00" - }, { - "city": "Victoria", - "latitude": -4.61667, - "longitude": 55.45, - "sunrise": "2017-02-09T02:24:06+00:00", - "sunset": "2017-02-09T14:40:41+00:00" - }, { - "city": "Vienna", - "latitude": 48.20849, - "longitude": 16.37208, - "sunrise": "2017-02-09T06:09:50+00:00", - "sunset": "2017-02-09T16:07:35+00:00" - }, { - "city": "Vientiane", - "latitude": 17.96667, - "longitude": 102.6, - "sunrise": "2017-02-08T23:39:15+00:00", - "sunset": "2017-02-09T11:08:20+00:00" - }, { - "city": "Vilnius", - "latitude": 54.68916, - "longitude": 25.2798, - "sunrise": "2017-02-09T05:51:26+00:00", - "sunset": "2017-02-09T15:14:43+00:00" - }, { - "city": "Warsaw", - "latitude": 52.22977, - "longitude": 21.01178, - "sunrise": "2017-02-09T06:01:20+00:00", - "sunset": "2017-02-09T15:38:58+00:00" - }, { - "city": "Washington, D. C.", - "latitude": 38.89511, - "longitude": -77.03637, - "sunrise": "2017-02-09T12:05:09+00:00", - "sunset": "2017-02-09T22:39:33+00:00" - }, { - "city": "Wellington", - "latitude": -41.28664, - "longitude": 174.77557, - "sunrise": "2017-02-08T17:37:42+00:00", - "sunset": "2017-02-09T07:32:28+00:00" - }, { - "city": "West Island", - "latitude": -12.15681, - "longitude": 96.82251, - "sunrise": "2017-02-08T23:30:34+00:00", - "sunset": "2017-02-09T12:03:14+00:00" - }, { - "city": "Willemstad", - "latitude": 12.1084, - "longitude": -68.93354, - "sunrise": "2017-02-09T10:58:51+00:00", - "sunset": "2017-02-09T22:41:00+00:00" - }, { - "city": "Windhoek", - "latitude": -22.55941, - "longitude": 17.08323, - "sunrise": "2017-02-09T04:37:35+00:00", - "sunset": "2017-02-09T17:34:09+00:00" - }, { - "city": "Yamoussoukro", - "latitude": 6.81667, - "longitude": -5.28333, - "sunrise": "2017-02-09T06:38:47+00:00", - "sunset": "2017-02-09T18:31:52+00:00" - }, { - "city": "Yaound??", - "latitude": 3.86667, - "longitude": 11.51667, - "sunrise": "2017-02-09T05:28:34+00:00", - "sunset": "2017-02-09T17:27:42+00:00" - }, { - "city": "Yerevan", - "latitude": 40.18111, - "longitude": 44.51361, - "sunrise": "2017-02-09T04:01:30+00:00", - "sunset": "2017-02-09T14:30:47+00:00" - }, { - "city": "Zagreb", - "latitude": 45.81444, - "longitude": 15.97798, - "sunrise": "2017-02-09T06:06:11+00:00", - "sunset": "2017-02-09T16:14:23+00:00" - }] diff --git a/Solar iOSTests/CorrectResults.swift b/Solar iOSTests/CorrectResults.swift new file mode 100644 index 0000000..bb88e8b --- /dev/null +++ b/Solar iOSTests/CorrectResults.swift @@ -0,0 +1,1432 @@ +// +// Created on 07/06/2020. +// +// + +import Foundation + +let correctResults = """ +[{ +"city": "Abu Dhabi", +"latitude": 24.46667, +"longitude": 54.36667, +"sunrise": "2017-02-09T02:59:40+00:00", +"sunset": "2017-02-09T14:13:47+00:00" +}, { +"city": "Abuja", +"latitude": 9.05735, +"longitude": 7.48976, +"sunrise": "2017-02-09T05:50:01+00:00", +"sunset": "2017-02-09T17:38:27+00:00" +}, { +"city": "Accra", +"latitude": 5.55602, +"longitude": -0.1969, +"sunrise": "2017-02-09T06:17:09+00:00", +"sunset": "2017-02-09T18:12:49+00:00" +}, { +"city": "Adamstown", +"latitude": -25.06597, +"longitude": -130.10147, +"sunrise": "2017-02-09T14:23:26+00:00", +"sunset": "2017-02-10T03:25:47+00:00" +}, { +"city": "Addis Ababa", +"latitude": 9.02497, +"longitude": 38.74689, +"sunrise": "2017-02-09T03:44:59+00:00", +"sunset": "2017-02-09T15:33:26+00:00" +}, { +"city": "Algiers", +"latitude": 36.7525, +"longitude": 3.04197, +"sunrise": "2017-02-09T06:41:38+00:00", +"sunset": "2017-02-09T17:22:25+00:00" +}, { +"city": "Alofi", +"latitude": -19.05952, +"longitude": -169.91867, +"sunrise": "2017-02-09T17:10:04+00:00", +"sunset": "2017-02-10T05:57:41+00:00" +}, { +"city": "Amman", +"latitude": 31.95522, +"longitude": 35.94503, +"sunrise": "2017-02-09T04:23:02+00:00", +"sunset": "2017-02-09T15:17:47+00:00" +}, { +"city": "Amsterdam", +"latitude": 52.37403, +"longitude": 4.88969, +"sunrise": "2017-02-09T07:06:08+00:00", +"sunset": "2017-02-09T16:43:09+00:00" +}, { +"city": "Andorra la Vella", +"latitude": 42.50779, +"longitude": 1.52109, +"sunrise": "2017-02-09T06:57:28+00:00", +"sunset": "2017-02-09T17:18:45+00:00" +}, { +"city": "Ankara", +"latitude": 39.91987, +"longitude": 32.85427, +"sunrise": "2017-02-09T04:47:39+00:00", +"sunset": "2017-02-09T15:17:54+00:00" +}, { +"city": "Antananarivo", +"latitude": -18.91433, +"longitude": 47.53098, +"sunrise": "2017-02-09T02:40:08+00:00", +"sunset": "2017-02-09T15:28:00+00:00" +}, { +"city": "Apia", +"latitude": -13.83333, +"longitude": -171.76666, +"sunrise": "2017-02-09T17:23:21+00:00", +"sunset": "2017-02-10T05:59:12+00:00" +}, { +"city": "Ashgabat", +"latitude": 37.95, +"longitude": 58.38333, +"sunrise": "2017-02-09T03:02:20+00:00", +"sunset": "2017-02-09T13:38:59+00:00" +}, { +"city": "Asmara", +"latitude": 15.33333, +"longitude": 38.93333, +"sunrise": "2017-02-09T03:50:56+00:00", +"sunset": "2017-02-09T15:25:59+00:00" +}, { +"city": "Astana", +"latitude": 51.1801, +"longitude": 71.44598, +"sunrise": "2017-02-09T02:37:03+00:00", +"sunset": "2017-02-09T12:19:47+00:00" +}, { +"city": "Asunci??n", +"latitude": -25.30066, +"longitude": -57.63591, +"sunrise": "2017-02-09T09:33:08+00:00", +"sunset": "2017-02-09T22:36:22+00:00" +}, { +"city": "Athens", +"latitude": 37.97945, +"longitude": 23.71622, +"sunrise": "2017-02-09T05:20:57+00:00", +"sunset": "2017-02-09T15:57:43+00:00" +}, { +"city": "Avarua", +"latitude": -21.20778, +"longitude": -159.775, +"sunrise": "2017-02-09T16:26:57+00:00", +"sunset": "2017-02-10T05:19:39+00:00" +}, { +"city": "Baghdad", +"latitude": 33.34058, +"longitude": 44.40088, +"sunrise": "2017-02-09T03:51:12+00:00", +"sunset": "2017-02-09T14:41:59+00:00" +}, { +"city": "Baku", +"latitude": 40.37767, +"longitude": 49.89201, +"sunrise": "2017-02-09T03:40:20+00:00", +"sunset": "2017-02-09T14:08:55+00:00" +}, { +"city": "Bamako", +"latitude": 12.65, +"longitude": -8, +"sunrise": "2017-02-09T06:55:45+00:00", +"sunset": "2017-02-09T18:36:39+00:00" +}, { +"city": "Bandar Seri Begawan", +"latitude": 4.94029, +"longitude": 114.94806, +"sunrise": "2017-02-08T22:35:58+00:00", +"sunset": "2017-02-09T10:32:50+00:00" +}, { +"city": "Bangkok", +"latitude": 13.75, +"longitude": 100.51667, +"sunrise": "2017-02-08T23:42:57+00:00", +"sunset": "2017-02-09T11:21:18+00:00" +}, { +"city": "Bangui", +"latitude": 4.36122, +"longitude": 18.55496, +"sunrise": "2017-02-09T05:00:55+00:00", +"sunset": "2017-02-09T16:59:02+00:00" +}, { +"city": "Banjul", +"latitude": 13.45274, +"longitude": -16.57803, +"sunrise": "2017-02-09T07:30:54+00:00", +"sunset": "2017-02-09T19:10:07+00:00" +}, { +"city": "Basseterre", +"latitude": 17.29484, +"longitude": -62.7261, +"sunrise": "2017-02-09T10:39:37+00:00", +"sunset": "2017-02-09T22:10:36+00:00" +}, { +"city": "Basse-Terre", +"latitude": 15.99854, +"longitude": -61.72548, +"sunrise": "2017-02-09T10:34:11+00:00", +"sunset": "2017-02-09T22:08:01+00:00" +}, { +"city": "Beijing", +"latitude": 39.9075, +"longitude": 116.39723, +"sunrise": "2017-02-08T23:13:43+00:00", +"sunset": "2017-02-09T09:43:29+00:00" +}, { +"city": "Beirut", +"latitude": 33.88894, +"longitude": 35.49442, +"sunrise": "2017-02-09T04:27:36+00:00", +"sunset": "2017-02-09T15:16:50+00:00" +}, { +"city": "Belgrade", +"latitude": 44.80401, +"longitude": 20.46513, +"sunrise": "2017-02-09T05:46:11+00:00", +"sunset": "2017-02-09T15:58:29+00:00" +}, { +"city": "Belmopan", +"latitude": 17.25, +"longitude": -88.76667, +"sunrise": "2017-02-09T12:23:42+00:00", +"sunset": "2017-02-09T23:54:50+00:00" +}, { +"city": "Berlin", +"latitude": 52.52437, +"longitude": 13.41053, +"sunrise": "2017-02-09T06:32:30+00:00", +"sunset": "2017-02-09T16:08:36+00:00" +}, { +"city": "Bern", +"latitude": 46.94809, +"longitude": 7.44744, +"sunrise": "2017-02-09T06:42:41+00:00", +"sunset": "2017-02-09T16:46:08+00:00" +}, { +"city": "Bishkek", +"latitude": 42.87306, +"longitude": 74.60028, +"sunrise": "2017-02-09T02:06:06+00:00", +"sunset": "2017-02-09T12:25:29+00:00" +}, { +"city": "Bissau", +"latitude": 11.85, +"longitude": -15.58333, +"sunrise": "2017-02-09T07:25:13+00:00", +"sunset": "2017-02-09T19:07:50+00:00" +}, { +"city": "Bogot?�", +"latitude": 4.60971, +"longitude": -74.08175, +"sunrise": "2017-02-09T11:11:42+00:00", +"sunset": "2017-02-09T23:09:21+00:00" +}, { +"city": "Bras??lia", +"latitude": -15.77972, +"longitude": -47.92972, +"sunrise": "2017-02-09T09:05:42+00:00", +"sunset": "2017-02-09T21:46:08+00:00" +}, { +"city": "Bratislava", +"latitude": 48.14816, +"longitude": 17.10674, +"sunrise": "2017-02-09T06:06:45+00:00", +"sunset": "2017-02-09T16:04:47+00:00" +}, { +"city": "Brazzaville", +"latitude": -4.2669, +"longitude": 15.28327, +"sunrise": "2017-02-09T05:05:09+00:00", +"sunset": "2017-02-09T17:20:59+00:00" +}, { +"city": "Bridgetown", +"latitude": 13.1, +"longitude": -59.61667, +"sunrise": "2017-02-09T10:22:39+00:00", +"sunset": "2017-02-09T22:02:41+00:00" +}, { +"city": "Brussels", +"latitude": 50.85045, +"longitude": 4.34878, +"sunrise": "2017-02-09T07:04:15+00:00", +"sunset": "2017-02-09T16:49:21+00:00" +}, { +"city": "Bucure�?ti", +"latitude": 44.43225, +"longitude": 26.10626, +"sunrise": "2017-02-09T05:22:54+00:00", +"sunset": "2017-02-09T15:36:38+00:00" +}, { +"city": "Budapest", +"latitude": 47.49801, +"longitude": 19.03991, +"sunrise": "2017-02-09T05:57:34+00:00", +"sunset": "2017-02-09T15:58:30+00:00" +}, { +"city": "Buenos Aires", +"latitude": -34.61315, +"longitude": -58.37723, +"sunrise": "2017-02-09T09:22:49+00:00", +"sunset": "2017-02-09T22:52:36+00:00" +}, { +"city": "Bujumbura", +"latitude": -3.37611, +"longitude": 29.36, +"sunrise": "2017-02-09T04:09:45+00:00", +"sunset": "2017-02-09T16:23:45+00:00" +}, { +"city": "Cairo", +"latitude": 30.06263, +"longitude": 31.24967, +"sunrise": "2017-02-09T04:39:14+00:00", +"sunset": "2017-02-09T15:39:10+00:00" +}, { +"city": "Canberra", +"latitude": -35.28346, +"longitude": 149.12807, +"sunrise": "2017-02-08T19:31:08+00:00", +"sunset": "2017-02-09T09:04:13+00:00" +}, { +"city": "Caracas", +"latitude": 10.5, +"longitude": -66.91667, +"sunrise": "2017-02-09T10:49:06+00:00", +"sunset": "2017-02-09T22:34:37+00:00" +}, { +"city": "Castries", +"latitude": 13.9957, +"longitude": -61.00614, +"sunrise": "2017-02-09T10:29:09+00:00", +"sunset": "2017-02-09T22:07:17+00:00" +}, { +"city": "Cayenne", +"latitude": 4.93333, +"longitude": -52.33333, +"sunrise": "2017-02-09T09:45:02+00:00", +"sunset": "2017-02-09T21:42:01+00:00" +}, { +"city": "Charlotte Amalie", +"latitude": 18.3419, +"longitude": -64.9307, +"sunrise": "2017-02-09T10:49:35+00:00", +"sunset": "2017-02-09T22:18:16+00:00" +}, { +"city": "Chi�?in��u", +"latitude": 47.00556, +"longitude": 28.8575, +"sunrise": "2017-02-09T05:17:15+00:00", +"sunset": "2017-02-09T15:20:16+00:00" +}, { +"city": "Cockburn Town", +"latitude": 21.46122, +"longitude": -71.14188, +"sunrise": "2017-02-09T11:17:57+00:00", +"sunset": "2017-02-09T22:39:35+00:00" +}, { +"city": "Colombo", +"latitude": 6.93194, +"longitude": 79.84778, +"sunrise": "2017-02-09T00:58:25+00:00", +"sunset": "2017-02-09T12:51:11+00:00" +}, { +"city": "Conakry", +"latitude": 9.53795, +"longitude": -13.67729, +"sunrise": "2017-02-09T07:15:11+00:00", +"sunset": "2017-02-09T19:02:38+00:00" +}, { +"city": "Copenhagen", +"latitude": 55.67594, +"longitude": 12.56553, +"sunrise": "2017-02-09T06:45:21+00:00", +"sunset": "2017-02-09T16:02:31+00:00" +}, { +"city": "Dakar", +"latitude": 14.6937, +"longitude": -17.44406, +"sunrise": "2017-02-09T07:35:42+00:00", +"sunset": "2017-02-09T19:12:15+00:00" +}, { +"city": "Damascus", +"latitude": 33.5102, +"longitude": 36.29128, +"sunrise": "2017-02-09T04:23:52+00:00", +"sunset": "2017-02-09T15:14:12+00:00" +}, { +"city": "Dhaka", +"latitude": 23.7104, +"longitude": 90.40744, +"sunrise": "2017-02-09T00:34:39+00:00", +"sunset": "2017-02-09T11:50:28+00:00" +}, { +"city": "Dili", +"latitude": -8.55861, +"longitude": 125.57361, +"sunrise": "2017-02-08T21:39:25+00:00", +"sunset": "2017-02-09T10:04:22+00:00" +}, { +"city": "Djibouti", +"latitude": 11.58767, +"longitude": 43.14468, +"sunrise": "2017-02-09T03:30:05+00:00", +"sunset": "2017-02-09T15:13:09+00:00" +}, { +"city": "Dodoma", +"latitude": -6.17486, +"longitude": 35.73792, +"sunrise": "2017-02-09T03:41:20+00:00", +"sunset": "2017-02-09T16:01:09+00:00" +}, { +"city": "Doha", +"latitude": 25.27932, +"longitude": 51.52245, +"sunrise": "2017-02-09T03:12:02+00:00", +"sunset": "2017-02-09T14:24:10+00:00" +}, { +"city": "Douglas", +"latitude": 54.15, +"longitude": -4.48333, +"sunrise": "2017-02-09T07:48:40+00:00", +"sunset": "2017-02-09T17:15:35+00:00" +}, { +"city": "Dublin", +"latitude": 53.34399, +"longitude": -6.26719, +"sunrise": "2017-02-09T07:53:26+00:00", +"sunset": "2017-02-09T17:25:06+00:00" +}, { +"city": "Dushanbe", +"latitude": 38.53575, +"longitude": 68.77905, +"sunrise": "2017-02-09T02:21:44+00:00", +"sunset": "2017-02-09T12:56:25+00:00" +}, { +"city": "Flying Fish Cove", +"latitude": -10.42172, +"longitude": 105.67912, +"sunrise": "2017-02-08T22:57:01+00:00", +"sunset": "2017-02-09T11:25:56+00:00" +}, { +"city": "Fort-de-France", +"latitude": 14.60892, +"longitude": -61.07334, +"sunrise": "2017-02-09T10:30:05+00:00", +"sunset": "2017-02-09T22:06:54+00:00" +}, { +"city": "Freetown", +"latitude": 8.484, +"longitude": -13.22994, +"sunrise": "2017-02-09T07:12:18+00:00", +"sunset": "2017-02-09T19:01:56+00:00" +}, { +"city": "Funafuti", +"latitude": -8.52425, +"longitude": 179.19417, +"sunrise": "2017-02-08T18:04:57+00:00", +"sunset": "2017-02-09T06:29:53+00:00" +}, { +"city": "Gaborone", +"latitude": -24.65451, +"longitude": 25.90859, +"sunrise": "2017-02-09T03:59:37+00:00", +"sunset": "2017-02-09T17:01:30+00:00" +}, { +"city": "George Town", +"latitude": 19.28692, +"longitude": -81.36706, +"sunrise": "2017-02-09T11:56:22+00:00", +"sunset": "2017-02-09T23:22:58+00:00" +}, { +"city": "Georgetown", +"latitude": 6.80448, +"longitude": -58.15527, +"sunrise": "2017-02-09T10:10:15+00:00", +"sunset": "2017-02-09T22:03:24+00:00" +}, { +"city": "Gibraltar", +"latitude": 36.14474, +"longitude": -5.35257, +"sunrise": "2017-02-09T07:14:15+00:00", +"sunset": "2017-02-09T17:56:58+00:00" +}, { +"city": "Grytviken", +"latitude": -54.28111, +"longitude": -36.5092, +"sunrise": "2017-02-09T07:10:34+00:00", +"sunset": "2017-02-09T22:09:54+00:00" +}, { +"city": "Guatemala City", +"latitude": 14.64072, +"longitude": -90.51327, +"sunrise": "2017-02-09T12:27:51+00:00", +"sunset": "2017-02-10T00:04:39+00:00" +}, { +"city": "Gustavia", +"latitude": 17.89618, +"longitude": -62.84978, +"sunrise": "2017-02-09T10:40:46+00:00", +"sunset": "2017-02-09T22:10:26+00:00" +}, { +"city": "H?� N��?i", +"latitude": 21.0245, +"longitude": 105.84117, +"sunrise": "2017-02-08T23:29:46+00:00", +"sunset": "2017-02-09T10:51:53+00:00" +}, { +"city": "Hag?�t?�a", +"latitude": 13.47417, +"longitude": 144.74778, +"sunrise": "2017-02-08T20:45:46+00:00", +"sunset": "2017-02-09T08:24:38+00:00" +}, { +"city": "Hamilton", +"latitude": 32.29149, +"longitude": -64.77797, +"sunrise": "2017-02-09T11:06:10+00:00", +"sunset": "2017-02-09T22:00:27+00:00" +}, { +"city": "Harare", +"latitude": -17.82935, +"longitude": 31.05389, +"sunrise": "2017-02-09T03:47:20+00:00", +"sunset": "2017-02-09T16:32:37+00:00" +}, { +"city": "Havana", +"latitude": 23.13302, +"longitude": -82.38304, +"sunrise": "2017-02-09T12:04:51+00:00", +"sunset": "2017-02-09T23:22:37+00:00" +}, { +"city": "Helsinki", +"latitude": 60.16952, +"longitude": 24.93545, +"sunrise": "2017-02-09T06:12:49+00:00", +"sunset": "2017-02-09T14:56:06+00:00" +}, { +"city": "Hong Kong", +"latitude": 22.28552, +"longitude": 114.15769, +"sunrise": "2017-02-08T22:58:00+00:00", +"sunset": "2017-02-09T10:17:08+00:00" +}, { +"city": "Honiara", +"latitude": -9.43333, +"longitude": 159.95, +"sunrise": "2017-02-08T19:20:58+00:00", +"sunset": "2017-02-09T07:47:49+00:00" +}, { +"city": "Isl��m��b��d", +"latitude": 33.72148, +"longitude": 73.04329, +"sunrise": "2017-02-09T01:57:15+00:00", +"sunset": "2017-02-09T12:46:47+00:00" +}, { +"city": "Jakarta", +"latitude": -6.21462, +"longitude": 106.84513, +"sunrise": "2017-02-08T22:56:50+00:00", +"sunset": "2017-02-09T11:16:47+00:00" +}, { +"city": "Jamestown", +"latitude": -15.93872, +"longitude": -5.71675, +"sunrise": "2017-02-09T06:16:38+00:00", +"sunset": "2017-02-09T18:57:30+00:00" +}, { +"city": "Kabul", +"latitude": 34.52813, +"longitude": 69.17233, +"sunrise": "2017-02-09T02:13:55+00:00", +"sunset": "2017-02-09T13:01:06+00:00" +}, { +"city": "Kampala", +"latitude": 0.31628, +"longitude": 32.58219, +"sunrise": "2017-02-09T04:00:40+00:00", +"sunset": "2017-02-09T16:07:04+00:00" +}, { +"city": "Kathmandu", +"latitude": 27.70169, +"longitude": 85.3206, +"sunrise": "2017-02-09T00:59:57+00:00", +"sunset": "2017-02-09T12:05:52+00:00" +}, { +"city": "Khartoum", +"latitude": 15.54665, +"longitude": 32.53361, +"sunrise": "2017-02-09T04:16:46+00:00", +"sunset": "2017-02-09T15:51:22+00:00" +}, { +"city": "Kiev", +"latitude": 50.45466, +"longitude": 30.5238, +"sunrise": "2017-02-09T05:18:40+00:00", +"sunset": "2017-02-09T15:05:32+00:00" +}, { +"city": "Kigali", +"latitude": -1.94995, +"longitude": 30.05885, +"sunrise": "2017-02-09T04:08:26+00:00", +"sunset": "2017-02-09T16:19:29+00:00" +}, { +"city": "Kingston", +"latitude": -29.05459, +"longitude": 167.96628, +"sunrise": "2017-02-08T18:25:11+00:00", +"sunset": "2017-02-09T07:39:28+00:00" +}, { +"city": "Kingston", +"latitude": 17.99702, +"longitude": -76.79358, +"sunrise": "2017-02-09T11:36:38+00:00", +"sunset": "2017-02-09T23:06:07+00:00" +}, { +"city": "Kingstown", +"latitude": 13.15872, +"longitude": -61.22475, +"sunrise": "2017-02-09T10:29:08+00:00", +"sunset": "2017-02-09T22:09:03+00:00" +}, { +"city": "Kinshasa", +"latitude": -4.32459, +"longitude": 15.32146, +"sunrise": "2017-02-09T05:04:56+00:00", +"sunset": "2017-02-09T17:20:53+00:00" +}, { +"city": "Kuala Lumpur", +"latitude": 3.1412, +"longitude": 101.68653, +"sunrise": "2017-02-08T23:27:09+00:00", +"sunset": "2017-02-09T11:27:44+00:00" +}, { +"city": "Kuwait", +"latitude": 29.36972, +"longitude": 47.97833, +"sunrise": "2017-02-09T03:31:26+00:00", +"sunset": "2017-02-09T14:33:08+00:00" +}, { +"city": "La Paz", +"latitude": -16.5, +"longitude": -68.15, +"sunrise": "2017-02-09T10:25:48+00:00", +"sunset": "2017-02-09T23:07:48+00:00" +}, { +"city": "Libreville", +"latitude": 0.38333, +"longitude": 9.45, +"sunrise": "2017-02-09T05:33:16+00:00", +"sunset": "2017-02-09T17:39:32+00:00" +}, { +"city": "Lilongwe", +"latitude": -13.98333, +"longitude": 33.78333, +"sunrise": "2017-02-09T03:40:46+00:00", +"sunset": "2017-02-09T16:17:21+00:00" +}, { +"city": "Lima", +"latitude": -12.04318, +"longitude": -77.02824, +"sunrise": "2017-02-09T11:06:15+00:00", +"sunset": "2017-02-09T23:38:23+00:00" +}, { +"city": "Lisbon", +"latitude": 38.71667, +"longitude": -9.13333, +"sunrise": "2017-02-09T07:33:27+00:00", +"sunset": "2017-02-09T18:08:01+00:00" +}, { +"city": "Ljubljana", +"latitude": 46.05108, +"longitude": 14.50513, +"sunrise": "2017-02-09T06:12:34+00:00", +"sunset": "2017-02-09T16:19:47+00:00" +}, { +"city": "Lom??", +"latitude": 6.13748, +"longitude": 1.21227, +"sunrise": "2017-02-09T06:12:07+00:00", +"sunset": "2017-02-09T18:06:35+00:00" +}, { +"city": "London", +"latitude": 51.50853, +"longitude": -0.12574, +"sunrise": "2017-02-09T07:23:50+00:00", +"sunset": "2017-02-09T17:05:34+00:00" +}, { +"city": "Luanda", +"latitude": -8.83833, +"longitude": 13.23444, +"sunrise": "2017-02-09T05:08:33+00:00", +"sunset": "2017-02-09T17:33:57+00:00" +}, { +"city": "Lusaka", +"latitude": -15.40809, +"longitude": 28.28636, +"sunrise": "2017-02-09T04:01:10+00:00", +"sunset": "2017-02-09T16:40:55+00:00" +}, { +"city": "Luxembourg", +"latitude": 49.61167, +"longitude": 6.13, +"sunrise": "2017-02-09T06:54:03+00:00", +"sunset": "2017-02-09T16:45:18+00:00" +}, { +"city": "Macau", +"latitude": 22.20056, +"longitude": 113.54611, +"sunrise": "2017-02-08T23:00:20+00:00", +"sunset": "2017-02-09T10:19:40+00:00" +}, { +"city": "Madrid", +"latitude": 40.4165, +"longitude": -3.70256, +"sunrise": "2017-02-09T07:14:37+00:00", +"sunset": "2017-02-09T17:43:24+00:00" +}, { +"city": "Majuro", +"latitude": 7.08971, +"longitude": 171.38027, +"sunrise": "2017-02-08T18:52:29+00:00", +"sunset": "2017-02-09T06:44:51+00:00" +}, { +"city": "Malabo", +"latitude": 3.75, +"longitude": 8.78333, +"sunrise": "2017-02-09T05:39:23+00:00", +"sunset": "2017-02-09T17:38:45+00:00" +}, { +"city": "Male", +"latitude": 4.1748, +"longitude": 73.50888, +"sunrise": "2017-02-09T01:20:55+00:00", +"sunset": "2017-02-09T13:19:23+00:00" +}, { +"city": "Mamoudzou", +"latitude": -12.77944, +"longitude": 45.22722, +"sunrise": "2017-02-09T02:56:19+00:00", +"sunset": "2017-02-09T15:30:15+00:00" +}, { +"city": "Managua", +"latitude": 12.13282, +"longitude": -86.2504, +"sunrise": "2017-02-09T12:08:08+00:00", +"sunset": "2017-02-09T23:50:16+00:00" +}, { +"city": "Manama", +"latitude": 26.21536, +"longitude": 50.5832, +"sunrise": "2017-02-09T03:16:57+00:00", +"sunset": "2017-02-09T14:26:46+00:00" +}, { +"city": "Manila", +"latitude": 14.6042, +"longitude": 120.9822, +"sunrise": "2017-02-08T22:22:02+00:00", +"sunset": "2017-02-09T09:58:30+00:00" +}, { +"city": "Maputo", +"latitude": -25.96528, +"longitude": 32.58917, +"sunrise": "2017-02-09T03:31:11+00:00", +"sunset": "2017-02-09T16:36:29+00:00" +}, { +"city": "Mariehamn", +"latitude": 60.09726, +"longitude": 19.93481, +"sunrise": "2017-02-09T06:32:28+00:00", +"sunset": "2017-02-09T15:16:27+00:00" +}, { +"city": "Marigot", +"latitude": 18.06667, +"longitude": -63.08333, +"sunrise": "2017-02-09T10:41:53+00:00", +"sunset": "2017-02-09T22:11:10+00:00" +}, { +"city": "Maseru", +"latitude": -29.31667, +"longitude": 27.48333, +"sunrise": "2017-02-09T03:47:04+00:00", +"sunset": "2017-02-09T17:01:28+00:00" +}, { +"city": "Mat?�'utu", +"latitude": -13.28163, +"longitude": -176.17453, +"sunrise": "2017-02-09T17:41:35+00:00", +"sunset": "2017-02-10T06:16:13+00:00" +}, { +"city": "Mbabane", +"latitude": -26.31667, +"longitude": 31.13333, +"sunrise": "2017-02-09T03:36:33+00:00", +"sunset": "2017-02-09T16:42:47+00:00" +}, { +"city": "Mexico City", +"latitude": 19.42847, +"longitude": -99.12766, +"sunrise": "2017-02-09T13:07:33+00:00", +"sunset": "2017-02-10T00:33:53+00:00" +}, { +"city": "Minsk", +"latitude": 53.9, +"longitude": 27.56667, +"sunrise": "2017-02-09T05:39:54+00:00", +"sunset": "2017-02-09T15:07:57+00:00" +}, { +"city": "Mogadishu", +"latitude": 2.03711, +"longitude": 45.34375, +"sunrise": "2017-02-09T03:11:23+00:00", +"sunset": "2017-02-09T15:14:15+00:00" +}, { +"city": "Monaco", +"latitude": 43.73333, +"longitude": 7.41667, +"sunrise": "2017-02-09T06:36:14+00:00", +"sunset": "2017-02-09T16:52:50+00:00" +}, { +"city": "Monrovia", +"latitude": 6.30054, +"longitude": -10.7969, +"sunrise": "2017-02-09T07:00:19+00:00", +"sunset": "2017-02-09T18:54:27+00:00" +}, { +"city": "Montevideo", +"latitude": -34.83346, +"longitude": -56.16735, +"sunrise": "2017-02-09T09:13:37+00:00", +"sunset": "2017-02-09T22:44:07+00:00" +}, { +"city": "Moroni", +"latitude": -11.70216, +"longitude": 43.25506, +"sunrise": "2017-02-09T03:05:23+00:00", +"sunset": "2017-02-09T15:36:58+00:00" +}, { +"city": "Moscow", +"latitude": 55.75222, +"longitude": 37.61556, +"sunrise": "2017-02-09T05:05:33+00:00", +"sunset": "2017-02-09T14:21:55+00:00" +}, { +"city": "Muscat", +"latitude": 23.61333, +"longitude": 58.59333, +"sunrise": "2017-02-09T02:41:45+00:00", +"sunset": "2017-02-09T13:57:54+00:00" +}, { +"city": "Nairobi", +"latitude": -1.28333, +"longitude": 36.81667, +"sunrise": "2017-02-09T03:42:05+00:00", +"sunset": "2017-02-09T15:51:46+00:00" +}, { +"city": "Nassau", +"latitude": 25.05823, +"longitude": -77.34306, +"sunrise": "2017-02-09T11:47:00+00:00", +"sunset": "2017-02-09T23:00:08+00:00" +}, { +"city": "Nay Pyi Taw", +"latitude": 19.745, +"longitude": 96.12972, +"sunrise": "2017-02-09T00:07:08+00:00", +"sunset": "2017-02-09T11:32:13+00:00" +}, { +"city": "N'Djamena", +"latitude": 12.11058, +"longitude": 15.03479, +"sunrise": "2017-02-09T05:23:03+00:00", +"sunset": "2017-02-09T17:05:04+00:00" +}, { +"city": "New Delhi", +"latitude": 28.63576, +"longitude": 77.22445, +"sunrise": "2017-02-09T01:33:32+00:00", +"sunset": "2017-02-09T12:37:03+00:00" +}, { +"city": "Ngerulmud", +"latitude": 7.50043, +"longitude": 134.62355, +"sunrise": "2017-02-08T21:19:56+00:00", +"sunset": "2017-02-09T09:11:28+00:00" +}, { +"city": "Niamey", +"latitude": 13.5125, +"longitude": 2.11178, +"sunrise": "2017-02-09T06:16:13+00:00", +"sunset": "2017-02-09T17:55:16+00:00" +}, { +"city": "Nicosia", +"latitude": 35.16667, +"longitude": 33.36667, +"sunrise": "2017-02-09T04:38:00+00:00", +"sunset": "2017-02-09T15:23:28+00:00" +}, { +"city": "Nouakchott", +"latitude": 18.10033, +"longitude": -15.94975, +"sunrise": "2017-02-09T07:33:27+00:00", +"sunset": "2017-02-09T19:02:32+00:00" +}, { +"city": "Noum??a", +"latitude": -22.27631, +"longitude": 166.4572, +"sunrise": "2017-02-08T18:40:11+00:00", +"sunset": "2017-02-09T07:36:32+00:00" +}, { +"city": "Nuku`alofa", +"latitude": -21.13333, +"longitude": -175.2, +"sunrise": "2017-02-09T17:28:46+00:00", +"sunset": "2017-02-10T06:21:15+00:00" +}, { +"city": "Nuuk", +"latitude": 64.18347, +"longitude": -51.72157, +"sunrise": "2017-02-09T11:38:57+00:00", +"sunset": "2017-02-09T19:43:13+00:00" +}, { +"city": "Oranjestad", +"latitude": 12.52398, +"longitude": -70.02703, +"sunrise": "2017-02-09T11:03:40+00:00", +"sunset": "2017-02-09T22:44:57+00:00" +}, { +"city": "Oslo", +"latitude": 59.91273, +"longitude": 10.74609, +"sunrise": "2017-02-09T07:08:22+00:00", +"sunset": "2017-02-09T15:54:03+00:00" +}, { +"city": "Ottawa", +"latitude": 45.41117, +"longitude": -75.69812, +"sunrise": "2017-02-09T12:11:42+00:00", +"sunset": "2017-02-09T22:22:17+00:00" +}, { +"city": "Ouagadougou", +"latitude": 12.36423, +"longitude": -1.53834, +"sunrise": "2017-02-09T06:29:36+00:00", +"sunset": "2017-02-09T18:11:06+00:00" +}, { +"city": "Pago Pago", +"latitude": -14.27806, +"longitude": -170.7025, +"sunrise": "2017-02-09T17:18:36+00:00", +"sunset": "2017-02-10T05:55:25+00:00" +}, { +"city": "Palikir - National Government Center", +"latitude": 6.92477, +"longitude": 158.16109, +"sunrise": "2017-02-08T19:45:11+00:00", +"sunset": "2017-02-09T07:37:54+00:00" +}, { +"city": "Panam?�", +"latitude": 8.9936, +"longitude": -79.51973, +"sunrise": "2017-02-09T11:37:57+00:00", +"sunset": "2017-02-09T23:26:37+00:00" +}, { +"city": "Papeete", +"latitude": -17.53333, +"longitude": -149.56667, +"sunrise": "2017-02-09T15:50:24+00:00", +"sunset": "2017-02-10T04:34:33+00:00" +}, { +"city": "Paramaribo", +"latitude": 5.86638, +"longitude": -55.16682, +"sunrise": "2017-02-09T09:57:20+00:00", +"sunset": "2017-02-09T21:52:24+00:00" +}, { +"city": "Paris", +"latitude": 48.85341, +"longitude": 2.3488, +"sunrise": "2017-02-09T07:07:21+00:00", +"sunset": "2017-02-09T17:02:15+00:00" +}, { +"city": "Philipsburg", +"latitude": 18.026, +"longitude": -63.04582, +"sunrise": "2017-02-09T10:41:42+00:00", +"sunset": "2017-02-09T22:11:04+00:00" +}, { +"city": "Phnom Penh", +"latitude": 11.56245, +"longitude": 104.91601, +"sunrise": "2017-02-08T23:23:01+00:00", +"sunset": "2017-02-09T11:06:03+00:00" +}, { +"city": "Plymouth", +"latitude": 16.70555, +"longitude": -62.21292, +"sunrise": "2017-02-09T10:36:55+00:00", +"sunset": "2017-02-09T22:09:11+00:00" +}, { +"city": "Podgorica", +"latitude": 42.44111, +"longitude": 19.26361, +"sunrise": "2017-02-09T05:46:27+00:00", +"sunset": "2017-02-09T16:07:50+00:00" +}, { +"city": "Port Louis", +"latitude": -20.16194, +"longitude": 57.49889, +"sunrise": "2017-02-09T01:58:46+00:00", +"sunset": "2017-02-09T14:49:37+00:00" +}, { +"city": "Port Moresby", +"latitude": -9.44314, +"longitude": 147.17972, +"sunrise": "2017-02-08T20:12:02+00:00", +"sunset": "2017-02-09T08:38:54+00:00" +}, { +"city": "Port-au-Prince", +"latitude": 18.53917, +"longitude": -72.335, +"sunrise": "2017-02-09T11:19:25+00:00", +"sunset": "2017-02-09T22:47:40+00:00" +}, { +"city": "Port-aux-Fran??ais", +"latitude": -49.35, +"longitude": 70.21667, +"sunrise": "2017-02-09T00:17:56+00:00", +"sunset": "2017-02-09T14:48:43+00:00" +}, { +"city": "Port-of-Spain", +"latitude": 10.66617, +"longitude": -61.51657, +"sunrise": "2017-02-09T10:27:41+00:00", +"sunset": "2017-02-09T22:12:51+00:00" +}, { +"city": "Porto-Novo", +"latitude": 6.49646, +"longitude": 2.60359, +"sunrise": "2017-02-09T06:06:55+00:00", +"sunset": "2017-02-09T18:00:39+00:00" +}, { +"city": "Port-Vila", +"latitude": -17.73381, +"longitude": 168.32188, +"sunrise": "2017-02-08T18:38:12+00:00", +"sunset": "2017-02-09T07:23:36+00:00" +}, { +"city": "Praha", +"latitude": 50.08804, +"longitude": 14.42076, +"sunrise": "2017-02-09T06:22:06+00:00", +"sunset": "2017-02-09T16:10:56+00:00" +}, { +"city": "Praia", +"latitude": 14.92148, +"longitude": -23.50868, +"sunrise": "2017-02-09T08:00:12+00:00", +"sunset": "2017-02-09T19:36:16+00:00" +}, { +"city": "Pretoria", +"latitude": -25.74486, +"longitude": 28.18783, +"sunrise": "2017-02-09T03:49:05+00:00", +"sunset": "2017-02-09T16:53:48+00:00" +}, { +"city": "Pristina", +"latitude": 42.67272, +"longitude": 21.16688, +"sunrise": "2017-02-09T05:39:16+00:00", +"sunset": "2017-02-09T15:59:47+00:00" +}, { +"city": "Pyongyang", +"latitude": 39.03385, +"longitude": 125.75432, +"sunrise": "2017-02-08T22:34:50+00:00", +"sunset": "2017-02-09T09:07:30+00:00" +}, { +"city": "Quito", +"latitude": -0.22985, +"longitude": -78.52495, +"sunrise": "2017-02-09T11:24:32+00:00", +"sunset": "2017-02-09T23:32:03+00:00" +}, { +"city": "Rabat", +"latitude": 34.01325, +"longitude": -6.83255, +"sunrise": "2017-02-09T07:16:59+00:00", +"sunset": "2017-02-09T18:06:04+00:00" +}, { +"city": "Reykjav??k", +"latitude": 64.13548, +"longitude": -21.89541, +"sunrise": "2017-02-09T09:39:38+00:00", +"sunset": "2017-02-09T17:43:56+00:00" +}, { +"city": "Riga", +"latitude": 56.946, +"longitude": 24.10589, +"sunrise": "2017-02-09T06:03:34+00:00", +"sunset": "2017-02-09T15:11:58+00:00" +}, { +"city": "Riyadh", +"latitude": 24.68773, +"longitude": 46.72185, +"sunrise": "2017-02-09T03:30:31+00:00", +"sunset": "2017-02-09T14:44:06+00:00" +}, { +"city": "Road Town", +"latitude": 18.41667, +"longitude": -64.61667, +"sunrise": "2017-02-09T10:48:25+00:00", +"sunset": "2017-02-09T22:16:55+00:00" +}, { +"city": "Roma", +"latitude": 41.89474, +"longitude": 12.4839, +"sunrise": "2017-02-09T06:12:32+00:00", +"sunset": "2017-02-09T16:35:59+00:00" +}, { +"city": "Roseau", +"latitude": 15.30174, +"longitude": -61.38808, +"sunrise": "2017-02-09T10:32:05+00:00", +"sunset": "2017-02-09T22:07:25+00:00" +}, { +"city": "S?�o Tom??", +"latitude": 0.33654, +"longitude": 6.72732, +"sunrise": "2017-02-09T05:44:06+00:00", +"sunset": "2017-02-09T17:50:28+00:00" +}, { +"city": "Saint George's", +"latitude": 12.05644, +"longitude": -61.74849, +"sunrise": "2017-02-09T10:30:04+00:00", +"sunset": "2017-02-09T22:12:19+00:00" +}, { +"city": "Saint Helier", +"latitude": 49.18333, +"longitude": -2.1, +"sunrise": "2017-02-09T07:25:54+00:00", +"sunset": "2017-02-09T17:19:17+00:00" +}, { +"city": "Saint John�??s", +"latitude": 17.11667, +"longitude": -61.85, +"sunrise": "2017-02-09T10:35:55+00:00", +"sunset": "2017-02-09T22:07:17+00:00" +}, { +"city": "Saint Peter Port", +"latitude": 49.45981, +"longitude": -2.53527, +"sunrise": "2017-02-09T07:28:18+00:00", +"sunset": "2017-02-09T17:20:22+00:00" +}, { +"city": "Saint-Denis", +"latitude": -20.88231, +"longitude": 55.4504, +"sunrise": "2017-02-09T02:06:06+00:00", +"sunset": "2017-02-09T14:58:41+00:00" +}, { +"city": "Saint-Pierre", +"latitude": 46.76544, +"longitude": -56.16949, +"sunrise": "2017-02-09T10:56:29+00:00", +"sunset": "2017-02-09T21:01:16+00:00" +}, { +"city": "San Jos??", +"latitude": 9.93333, +"longitude": -84.08333, +"sunrise": "2017-02-09T11:57:10+00:00", +"sunset": "2017-02-09T23:43:54+00:00" +}, { +"city": "San Juan", +"latitude": 18.46633, +"longitude": -66.10572, +"sunrise": "2017-02-09T10:54:25+00:00", +"sunset": "2017-02-09T22:22:49+00:00" +}, { +"city": "San Marino", +"latitude": 43.93333, +"longitude": 12.45, +"sunrise": "2017-02-09T06:16:30+00:00", +"sunset": "2017-02-09T16:32:17+00:00" +}, { +"city": "San Salvador", +"latitude": 13.68935, +"longitude": -89.18718, +"sunrise": "2017-02-09T12:21:32+00:00", +"sunset": "2017-02-10T00:00:22+00:00" +}, { +"city": "Sanaa", +"latitude": 15.35472, +"longitude": 44.20667, +"sunrise": "2017-02-09T03:29:52+00:00", +"sunset": "2017-02-09T15:04:52+00:00" +}, { +"city": "Santiago", +"latitude": -33.42628, +"longitude": -70.56656, +"sunrise": "2017-02-09T10:13:28+00:00", +"sunset": "2017-02-09T23:39:28+00:00" +}, { +"city": "Santo Domingo", +"latitude": 18.50012, +"longitude": -69.98857, +"sunrise": "2017-02-09T11:09:59+00:00", +"sunset": "2017-02-09T22:38:19+00:00" +}, { +"city": "Sarajevo", +"latitude": 43.84864, +"longitude": 18.35644, +"sunrise": "2017-02-09T05:52:44+00:00", +"sunset": "2017-02-09T16:08:48+00:00" +}, { +"city": "Seoul", +"latitude": 37.56826, +"longitude": 126.97783, +"sunrise": "2017-02-08T22:27:33+00:00", +"sunset": "2017-02-09T09:05:01+00:00" +}, { +"city": "Singapore", +"latitude": 1.28967, +"longitude": 103.85007, +"sunrise": "2017-02-08T23:16:36+00:00", +"sunset": "2017-02-09T11:20:59+00:00" +}, { +"city": "Skopje", +"latitude": 42, +"longitude": 21.43333, +"sunrise": "2017-02-09T05:36:58+00:00", +"sunset": "2017-02-09T15:59:58+00:00" +}, { +"city": "Sofia", +"latitude": 42.69751, +"longitude": 23.32415, +"sunrise": "2017-02-09T05:30:42+00:00", +"sunset": "2017-02-09T15:51:06+00:00" +}, { +"city": "Stanley", +"latitude": -51.7, +"longitude": -57.85, +"sunrise": "2017-02-09T08:44:14+00:00", +"sunset": "2017-02-09T23:26:58+00:00" +}, { +"city": "Stockholm", +"latitude": 59.33258, +"longitude": 18.0649, +"sunrise": "2017-02-09T06:36:44+00:00", +"sunset": "2017-02-09T15:27:09+00:00" +}, { +"city": "Sucre", +"latitude": -19.03332, +"longitude": -65.26274, +"sunrise": "2017-02-09T10:11:20+00:00", +"sunset": "2017-02-09T22:59:10+00:00" +}, { +"city": "Suva", +"latitude": -18.14161, +"longitude": 178.44149, +"sunrise": "2017-02-08T17:57:14+00:00", +"sunset": "2017-02-09T06:43:37+00:00" +}, { +"city": "T??rshavn", +"latitude": 62.00973, +"longitude": -6.77164, +"sunrise": "2017-02-09T08:27:53+00:00", +"sunset": "2017-02-09T16:54:41+00:00" +}, { +"city": "Taipei", +"latitude": 25.04776, +"longitude": 121.53185, +"sunrise": "2017-02-08T22:31:50+00:00", +"sunset": "2017-02-09T09:44:17+00:00" +}, { +"city": "Tallinn", +"latitude": 59.43696, +"longitude": 24.75353, +"sunrise": "2017-02-09T06:10:27+00:00", +"sunset": "2017-02-09T14:59:55+00:00" +}, { +"city": "Tarawa", +"latitude": 1.3278, +"longitude": 172.97696, +"sunrise": "2017-02-08T18:40:08+00:00", +"sunset": "2017-02-09T06:44:26+00:00" +}, { +"city": "Tashkent", +"latitude": 41.26465, +"longitude": 69.21627, +"sunrise": "2017-02-09T02:24:40+00:00", +"sunset": "2017-02-09T12:49:59+00:00" +}, { +"city": "Tbilisi", +"latitude": 41.69411, +"longitude": 44.83368, +"sunrise": "2017-02-09T04:02:53+00:00", +"sunset": "2017-02-09T14:26:50+00:00" +}, { +"city": "Tegucigalpa", +"latitude": 14.0818, +"longitude": -87.20681, +"sunrise": "2017-02-09T12:14:02+00:00", +"sunset": "2017-02-09T23:52:02+00:00" +}, { +"city": "Tehr��n", +"latitude": 35.69439, +"longitude": 51.42151, +"sunrise": "2017-02-09T03:26:37+00:00", +"sunset": "2017-02-09T14:10:24+00:00" +}, { +"city": "The Valley", +"latitude": 18.21704, +"longitude": -63.05783, +"sunrise": "2017-02-09T10:41:57+00:00", +"sunset": "2017-02-09T22:10:54+00:00" +}, { +"city": "Thimphu", +"latitude": 27.46609, +"longitude": 89.64191, +"sunrise": "2017-02-09T00:42:23+00:00", +"sunset": "2017-02-09T11:48:52+00:00" +}, { +"city": "Tirana", +"latitude": 41.3275, +"longitude": 19.81889, +"sunrise": "2017-02-09T05:42:12+00:00", +"sunset": "2017-02-09T16:07:38+00:00" +}, { +"city": "Tokyo", +"latitude": 35.61488, +"longitude": 139.5813, +"sunrise": "2017-02-08T21:34:06+00:00", +"sunset": "2017-02-09T08:17:38+00:00" +}, { +"city": "Tripoli", +"latitude": 32.87519, +"longitude": 13.18746, +"sunrise": "2017-02-09T05:55:19+00:00", +"sunset": "2017-02-09T16:47:35+00:00" +}, { +"city": "Tunis", +"latitude": 36.81897, +"longitude": 10.16579, +"sunrise": "2017-02-09T06:13:16+00:00", +"sunset": "2017-02-09T16:53:48+00:00" +}, { +"city": "Ulaanbaatar", +"latitude": 47.90771, +"longitude": 106.88324, +"sunrise": "2017-02-09T00:07:30+00:00", +"sunset": "2017-02-09T10:05:49+00:00" +}, { +"city": "Vaduz", +"latitude": 47.14151, +"longitude": 9.52154, +"sunrise": "2017-02-09T06:34:49+00:00", +"sunset": "2017-02-09T16:37:24+00:00" +}, { +"city": "Valletta", +"latitude": 35.89972, +"longitude": 14.51472, +"sunrise": "2017-02-09T05:54:28+00:00", +"sunset": "2017-02-09T16:37:49+00:00" +}, { +"city": "Vatican City", +"latitude": 41.90236, +"longitude": 12.45332, +"sunrise": "2017-02-09T06:12:40+00:00", +"sunset": "2017-02-09T16:36:05+00:00" +}, { +"city": "Victoria", +"latitude": -4.61667, +"longitude": 55.45, +"sunrise": "2017-02-09T02:24:06+00:00", +"sunset": "2017-02-09T14:40:41+00:00" +}, { +"city": "Vienna", +"latitude": 48.20849, +"longitude": 16.37208, +"sunrise": "2017-02-09T06:09:50+00:00", +"sunset": "2017-02-09T16:07:35+00:00" +}, { +"city": "Vientiane", +"latitude": 17.96667, +"longitude": 102.6, +"sunrise": "2017-02-08T23:39:15+00:00", +"sunset": "2017-02-09T11:08:20+00:00" +}, { +"city": "Vilnius", +"latitude": 54.68916, +"longitude": 25.2798, +"sunrise": "2017-02-09T05:51:26+00:00", +"sunset": "2017-02-09T15:14:43+00:00" +}, { +"city": "Warsaw", +"latitude": 52.22977, +"longitude": 21.01178, +"sunrise": "2017-02-09T06:01:20+00:00", +"sunset": "2017-02-09T15:38:58+00:00" +}, { +"city": "Washington, D. C.", +"latitude": 38.89511, +"longitude": -77.03637, +"sunrise": "2017-02-09T12:05:09+00:00", +"sunset": "2017-02-09T22:39:33+00:00" +}, { +"city": "Wellington", +"latitude": -41.28664, +"longitude": 174.77557, +"sunrise": "2017-02-08T17:37:42+00:00", +"sunset": "2017-02-09T07:32:28+00:00" +}, { +"city": "West Island", +"latitude": -12.15681, +"longitude": 96.82251, +"sunrise": "2017-02-08T23:30:34+00:00", +"sunset": "2017-02-09T12:03:14+00:00" +}, { +"city": "Willemstad", +"latitude": 12.1084, +"longitude": -68.93354, +"sunrise": "2017-02-09T10:58:51+00:00", +"sunset": "2017-02-09T22:41:00+00:00" +}, { +"city": "Windhoek", +"latitude": -22.55941, +"longitude": 17.08323, +"sunrise": "2017-02-09T04:37:35+00:00", +"sunset": "2017-02-09T17:34:09+00:00" +}, { +"city": "Yamoussoukro", +"latitude": 6.81667, +"longitude": -5.28333, +"sunrise": "2017-02-09T06:38:47+00:00", +"sunset": "2017-02-09T18:31:52+00:00" +}, { +"city": "Yaound??", +"latitude": 3.86667, +"longitude": 11.51667, +"sunrise": "2017-02-09T05:28:34+00:00", +"sunset": "2017-02-09T17:27:42+00:00" +}, { +"city": "Yerevan", +"latitude": 40.18111, +"longitude": 44.51361, +"sunrise": "2017-02-09T04:01:30+00:00", +"sunset": "2017-02-09T14:30:47+00:00" +}, { +"city": "Zagreb", +"latitude": 45.81444, +"longitude": 15.97798, +"sunrise": "2017-02-09T06:06:11+00:00", +"sunset": "2017-02-09T16:14:23+00:00" +}] +""" diff --git a/Solar iOSTests/Solar_iOSTests.swift b/Solar iOSTests/Solar_iOSTests.swift index fee1311..fe89b0a 100644 --- a/Solar iOSTests/Solar_iOSTests.swift +++ b/Solar iOSTests/Solar_iOSTests.swift @@ -19,10 +19,8 @@ final class Solar_iOSTests: XCTestCase { private let testAccuracy: TimeInterval = 60 * 5 private lazy var cities: [City] = { - guard - let resultsURLString = Bundle(for: type(of: self)).path(forResource: "CorrectResults", ofType: "json"), - let data = try? Data(contentsOf: URL(fileURLWithPath: resultsURLString)), - let dictionary = try? JSONSerialization.jsonObject(with: data, options: []), + let data = Data(correctResults.utf8) + guard let dictionary = try? JSONSerialization.jsonObject(with: data, options: []), let cityDictionaries = dictionary as? [[String : Any]] else { fatalError("Correct results JSON doesn't appear to be included in the test bundle.") @@ -161,4 +159,46 @@ final class Solar_iOSTests: XCTestCase { let solar2 = Solar(for: testDate, coordinate: invalidCoordinate2) XCTAssertNil(solar2) } + + + /// Sun and Moon Data for One Day + /// + /// U.S. Naval Observatory + /// Astronomical Applications Department + /// + /// (Longitude W 94° 0', Latitude N 39° 0') + /// + /// Friday, May 3, 2019 Universal Time - 5h + /// Sun + /// Begin civil twilight 05:47 + /// Sunrise 06:16 + /// Sun transit 13:13 + /// Sunset 20:11 + /// End civil twilight 20:40 + /// Moon + /// Moonrise 05:56 + /// Moon transit 12:24 + /// Moonset 19:00 + /// + /// [https://aa.usno.navy.mil/data/docs/RS_OneDay.php](https://aa.usno.navy.mil/data/docs/RS_OneDay.php) + func testPlainLatLon() { + let tdf: DateFormatter = { + let df = DateFormatter() + df.dateFormat = "MM/dd/yyyy HH:mm zzz" + return df + }() + let testCriticalEvening = tdf.date(from: "05/03/2019 19:20 CDT")! + let testLocation: CLLocation = CLLocation(latitude: 39.00, longitude: -94.0) + let expectedSunrise = "05/03/2019 06:16 CDT" + let expectedSunset = "05/03/2019 20:11 CDT" + let timezone = TimeZone(identifier: "America/Chicago")! + let solar = Solar(for: testCriticalEvening, coordinate: testLocation.coordinate, timezone: timezone) + + XCTAssertEqual(solar!.sunrise!.timeIntervalSince1970, tdf.date(from: expectedSunrise)!.timeIntervalSince1970, accuracy: testAccuracy, + "Expected: \(expectedSunrise), Received: \(tdf.string(from: solar!.sunrise!))") + XCTAssertEqual(solar!.sunset!.timeIntervalSince1970, tdf.date(from: expectedSunset)!.timeIntervalSince1970, accuracy: testAccuracy, + "Expected: \(expectedSunset), Received: \(tdf.string(from: solar!.sunset!))") + } + + } diff --git a/Solar.xcodeproj/project.pbxproj b/Solar.xcodeproj/project.pbxproj index 9e95b40..c149a99 100644 --- a/Solar.xcodeproj/project.pbxproj +++ b/Solar.xcodeproj/project.pbxproj @@ -11,7 +11,7 @@ 14381E7A1EF96100008E9826 /* Solar.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7FC5B5A1D469B2700C4D3EB /* Solar.framework */; }; 14456B851EF96AC000D76A4D /* City.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14456B831EF96ABA00D76A4D /* City.swift */; }; 14456B881EF96ACD00D76A4D /* Solar_iOSTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14456B861EF96ACA00D76A4D /* Solar_iOSTests.swift */; }; - 14456B8D1EF96AE200D76A4D /* CorrectResults.json in Resources */ = {isa = PBXBuildFile; fileRef = 14456B891EF96AD900D76A4D /* CorrectResults.json */; }; + 4F334846248D905C00BAAD4E /* CorrectResults.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F334845248D905B00BAAD4E /* CorrectResults.swift */; }; F7FC5B661D469B4E00C4D3EB /* Solar.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7FC5B651D469B4E00C4D3EB /* Solar.swift */; }; /* End PBXBuildFile section */ @@ -31,8 +31,8 @@ 1410E9C01EF12B5A001829A5 /* Solar.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Solar.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 14456B831EF96ABA00D76A4D /* City.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = City.swift; path = "Solar iOSTests/City.swift"; sourceTree = ""; }; 14456B861EF96ACA00D76A4D /* Solar_iOSTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Solar_iOSTests.swift; path = "Solar iOSTests/Solar_iOSTests.swift"; sourceTree = ""; }; - 14456B891EF96AD900D76A4D /* CorrectResults.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = CorrectResults.json; path = "Solar iOSTests/CorrectResults.json"; sourceTree = ""; }; 14456B8A1EF96AD900D76A4D /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = "Solar iOSTests/Info.plist"; sourceTree = ""; }; + 4F334845248D905B00BAAD4E /* CorrectResults.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CorrectResults.swift; path = "Solar iOSTests/CorrectResults.swift"; sourceTree = ""; }; 97837EAB1E4BB1DE000FEF64 /* Solar_iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Solar_iOSTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; F7FC5B5A1D469B2700C4D3EB /* Solar.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Solar.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F7FC5B651D469B4E00C4D3EB /* Solar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Solar.swift; sourceTree = ""; }; @@ -85,8 +85,8 @@ 14456B821EF96AA500D76A4D /* Resources */ = { isa = PBXGroup; children = ( + 4F334845248D905B00BAAD4E /* CorrectResults.swift */, 14456B8A1EF96AD900D76A4D /* Info.plist */, - 14456B891EF96AD900D76A4D /* CorrectResults.json */, ); name = Resources; sourceTree = ""; @@ -251,7 +251,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 14456B8D1EF96AE200D76A4D /* CorrectResults.json in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -287,6 +286,7 @@ buildActionMask = 2147483647; files = ( F7FC5B661D469B4E00C4D3EB /* Solar.swift in Sources */, + 4F334846248D905C00BAAD4E /* CorrectResults.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -323,7 +323,6 @@ SDKROOT = watchos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 3.2; }; @@ -350,7 +349,6 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = watchos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 3.2; }; @@ -438,7 +436,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -491,7 +489,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0.1; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; diff --git a/Solar.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Solar.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Solar.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Solar/Solar.swift b/Solar/Solar.swift index d2d67e6..3d0dc9b 100644 --- a/Solar/Solar.swift +++ b/Solar/Solar.swift @@ -34,7 +34,8 @@ public struct Solar { /// The date to generate sunrise / sunset times for public fileprivate(set) var date: Date - + public fileprivate(set) var timezone: TimeZone + public fileprivate(set) var sunrise: Date? public fileprivate(set) var sunset: Date? public fileprivate(set) var civilSunrise: Date? @@ -46,9 +47,10 @@ public struct Solar { // MARK: Init - public init?(for date: Date = Date(), coordinate: CLLocationCoordinate2D) { + public init?(for date: Date = Date(), coordinate: CLLocationCoordinate2D, timezone: TimeZone = TimeZone(identifier: "UTC")!) { self.date = date - + self.timezone = timezone + guard CLLocationCoordinate2DIsValid(coordinate) else { return nil } @@ -91,11 +93,16 @@ public struct Solar { fileprivate func calculate(_ sunriseSunset: SunriseSunset, for date: Date, and zenith: Zenith) -> Date? { guard let utcTimezone = TimeZone(identifier: "UTC") else { return nil } - + // Get the day of the year var calendar = Calendar(identifier: .gregorian) calendar.timeZone = utcTimezone - guard let dayInt = calendar.ordinality(of: .day, in: .year, for: date) else { return nil } + + // Workaround a bug: if it is late enough in MY timezone to be tomorrow in UTC, Solar was returning tomorrow's sun times. + let secondsFromGMT = TimeInterval(self.timezone.secondsFromGMT()) + let dateOffset = date.addingTimeInterval(secondsFromGMT) + + guard let dayInt = calendar.ordinality(of: .day, in: .year, for: dateOffset) else { return nil } let day = Double(dayInt) // Convert longitude to hour value and calculate an approx. time @@ -169,11 +176,11 @@ public struct Solar { let setDate: Date if shouldBeYesterday { - setDate = Date(timeInterval: -(60 * 60 * 24), since: date) + setDate = Date(timeInterval: -(60 * 60 * 24), since: dateOffset) } else if shouldBeTomorrow { - setDate = Date(timeInterval: (60 * 60 * 24), since: date) + setDate = Date(timeInterval: (60 * 60 * 24), since: dateOffset) } else { - setDate = date + setDate = dateOffset } var components = calendar.dateComponents([.day, .month, .year], from: setDate) @@ -214,14 +221,23 @@ extension Solar { return false } - let beginningOfDay = sunrise.timeIntervalSince1970 - let endOfDay = sunset.timeIntervalSince1970 + let todaySunrise = sunrise.timeIntervalSince1970 + let todaySunset = sunset.timeIntervalSince1970 let currentTime = self.date.timeIntervalSince1970 - let isSunriseOrLater = currentTime >= beginningOfDay - let isBeforeSunset = currentTime < endOfDay + let yesterday = date.addingTimeInterval(TimeInterval(exactly: -86400.0)!) + let yesterdaySunrise = calculate(.sunrise, for: yesterday, and: .official)?.timeIntervalSince1970 + let yesterdaySunset = calculate(.sunset, for: yesterday, and: .official)?.timeIntervalSince1970 + + let tomorrow = date.addingTimeInterval(TimeInterval(exactly: 86400.0)!) + let tomorrowSunrise = calculate(.sunrise, for: tomorrow, and: .official)?.timeIntervalSince1970 + let tomorrowSunSet = calculate(.sunset, for: tomorrow, and: .official)?.timeIntervalSince1970 + + let isDayYesterday = yesterdaySunrise! < currentTime && currentTime < yesterdaySunset! + let isDayToday = todaySunrise < currentTime && currentTime < todaySunset + let isDayTomorrow = tomorrowSunrise! < currentTime && currentTime < tomorrowSunSet! - return isSunriseOrLater && isBeforeSunset + return isDayYesterday || isDayToday || isDayTomorrow } /// Whether the location specified by the `latitude` and `longitude` is in nighttime on `date`