@@ -32,8 +32,8 @@ public struct CurrentWeather: Equatable, Hashable {
publicvarsunState:CelestialState?=.normal
publicvarmoonrise:Date?
publicvarmoonset:Date?
/// An approximate moonset value that can be used to draw animation when usual moonset is not available. Do not show this value to the user as actual time.
publicvarapproximateMoonset:Date?
/// An approximate moonrise value that can be used to draw animation when usual moonrise is not available. Do not show this value to the user as actual time.
// In CurrentWeather (which is what `today` is) we're only interested in moonrise / moonset pair that hasn't passed yet.
// Moonrise / moonset are available in daily in the WDT API.
// And in DailyWeather moonset happens in the morning, before the moonrise in the evening.
// So, we need to find the first moonset in daily that hasn't passed (and that isn't too far from the current date). The day before it (if we have it) will contain the corresponding moonrise.