From a5668ef729586567b6d85b17a23d1b7e13fd11f4 Mon Sep 17 00:00:00 2001 From: Sean Scott <3287046+oraclesean@users.noreply.github.com> Date: Sun, 2 Jan 2022 11:35:29 -0700 Subject: [PATCH 1/3] Update forecast.njk Add an absolute date option to the weather module's forecast. --- modules/default/weather/forecast.njk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/default/weather/forecast.njk b/modules/default/weather/forecast.njk index 32a2e4a6..2bac7eae 100644 --- a/modules/default/weather/forecast.njk +++ b/modules/default/weather/forecast.njk @@ -8,9 +8,9 @@ {% set forecast = forecast.slice(0, numSteps) %} {% for f in forecast %} - {% if (currentStep == 0) and config.ignoreToday == false %} + {% if (currentStep == 0) and config.ignoreToday == false and config.absoluteDates == false %} {{ "TODAY" | translate }} - {% elif (currentStep == 1) and config.ignoreToday == false %} + {% elif (currentStep == 1) and config.ignoreToday == false and config.absoluteDates == false %} {{ "TOMORROW" | translate }} {% else %} {{ f.date.format('ddd') }} From 3ebdb67bc0c3eb8a5564d2fe97750c408c881e92 Mon Sep 17 00:00:00 2001 From: Sean Scott <3287046+oraclesean@users.noreply.github.com> Date: Sun, 2 Jan 2022 11:44:01 -0700 Subject: [PATCH 2/3] Update CHANGELOG.md Update CHANCEGLOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d42eb1d9..7fcb149f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ _This release is scheduled to be released on 2022-04-01._ ### Added +- Added a config option under the weather module, absoluteDates, providing an option to format weather forecast date output with either absolute or relative dates. + ### Updated ### Fixed From 0f596d562008bd6dc963296bb8854c8ad86795ab Mon Sep 17 00:00:00 2001 From: Sean Scott <3287046+oraclesean@users.noreply.github.com> Date: Sun, 2 Jan 2022 14:45:24 -0700 Subject: [PATCH 3/3] Update weather.js Set absoluteDates default to false --- modules/default/weather/weather.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/default/weather/weather.js b/modules/default/weather/weather.js index 62182211..e4acc733 100644 --- a/modules/default/weather/weather.js +++ b/modules/default/weather/weather.js @@ -43,7 +43,8 @@ Module.register("weather", { onlyTemp: false, showPrecipitationAmount: false, colored: false, - showFeelsLike: true + showFeelsLike: true, + absoluteDates: false }, // Module properties.