Merge pull request #2764 from oraclesean/patch-1

This commit is contained in:
Michael Teeuw 2022-01-07 21:44:46 +01:00 committed by GitHub
commit 0e6d40f96c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -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

View File

@ -8,9 +8,9 @@
{% set forecast = forecast.slice(0, numSteps) %}
{% for f in forecast %}
<tr {% if config.colored %}class="colored"{% endif %} {% if config.fade %}style="opacity: {{ currentStep | opacity(numSteps) }};"{% endif %}>
{% if (currentStep == 0) and config.ignoreToday == false %}
{% if (currentStep == 0) and config.ignoreToday == false and config.absoluteDates == false %}
<td class="day">{{ "TODAY" | translate }}</td>
{% elif (currentStep == 1) and config.ignoreToday == false %}
{% elif (currentStep == 1) and config.ignoreToday == false and config.absoluteDates == false %}
<td class="day">{{ "TOMORROW" | translate }}</td>
{% else %}
<td class="day">{{ f.date.format('ddd') }}</td>

View File

@ -43,7 +43,8 @@ Module.register("weather", {
onlyTemp: false,
showPrecipitationAmount: false,
colored: false,
showFeelsLike: true
showFeelsLike: true,
absoluteDates: false
},
// Module properties.