Using WeatherKit I want to get a 5-day forecast starting tomorrow, however, I only get 4 elements in the forecast. What am I missing here?
public func updateWeather()async{
guard locationManager.location != nil else {locationManager.updateLocation(); return}
if self.needsUpdating{
let startOfToday = Calendar.current.startOfDay(for: Date())
let endOfToday = startOfToday+24*3600
let firstDay:Date = endOfToday+1
let lastDay:Date = firstDay+(5*24*3600)
futureWeather = try? await WeatherService.shared.weather(for: locationManager.location!,
including: .daily(startDate: firstDay, endDate: lastDay)
)
}
}