Skip to content

Commit

Permalink
Small correction for days mode
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelroth committed Oct 2, 2023
1 parent 4c465fd commit bb9099a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/lib/WeatherOverview.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
export let mode;
const forecastItems = forecastPoint[mode].filter((item) => {
const currentDate = mode === "days" ? new Date() : new Date();
const currentDate = new Date();
if (mode === "days") {
currentDate.setHours(0, 0, 0, 0);
}
return new Date(item.date_time).getTime() >= currentDate.getTime();
});
Expand Down

0 comments on commit bb9099a

Please sign in to comment.