Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
Updated current forecast
Browse files Browse the repository at this point in the history
  • Loading branch information
devmaximilian committed Feb 14, 2021
1 parent 32986cf commit c66e3a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Weather/Models/Weather.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extension Weather {
}

/// - Returns: The most relevant `Forecast`
public func get(by date: Date = .init()) -> Forecast? {
public func get(by date: Date = .init(timeIntervalSinceNow: 60 * 60 * -1)) -> Forecast? {
return forecasts.first { forecast -> Bool in
forecast.validTime >= date
}
Expand Down

0 comments on commit c66e3a3

Please sign in to comment.