Skip to content

Commit

Permalink
Merge pull request #3 from dxmnkd316/includetoday
Browse files Browse the repository at this point in the history
Fix error - Include today and full number of days
  • Loading branch information
dxmnkd316 authored Sep 6, 2024
2 parents 0451567 + b739e76 commit ddd1ba4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const CARD_VERSION = '1.0.17';
export const CARD_VERSION = '1.0.18';
3 changes: 2 additions & 1 deletion src/platinumdx-weather-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ export class PlatinumdxWeatherCard extends LitElement {
const htmlDays: TemplateResult[] = [];
const days = this._config.daily_forecast_days || 5;

for (var i = 0; i < days; i++) {
for (var i = 0; i < days + 1; i++) {
//added +1 to days to make sure that today AND the full number of days selected are shown.
const forecastDate = new Date();
forecastDate.setDate(forecastDate.getDate() + i);
//deleted +1 after +i to try and include today in forecast display.
Expand Down

0 comments on commit ddd1ba4

Please sign in to comment.