Skip to content

Commit 6d0fb62

Browse files
[weather] feat: add configurable forecast date format option
1 parent 9ff716f commit 6d0fb62

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ planned for 2026-01-01
1313

1414
### Added
1515

16+
- [weather] feat: add configurable forecast date format option (#3918)
17+
1618
### Changed
1719

1820
- [core] refactor: replace `module-alias` dependency with internal alias resolver (#3893)

modules/default/weather/forecast.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{% elif (currentStep == 1) and config.ignoreToday == false and config.absoluteDates == false %}
1717
<td class="day">{{ "TOMORROW" | translate }}</td>
1818
{% else %}
19-
<td class="day">{{ f.date.format("ddd") }}</td>
19+
<td class="day">{{ f.date.format(config.forecastDateFormat) }}</td>
2020
{% endif %}
2121
<td class="bright weather-icon">
2222
<span class="wi weathericon wi-{{ f.weatherType }}"></span>

modules/default/weather/weather.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ Module.register("weather", {
4141
onlyTemp: false,
4242
colored: false,
4343
absoluteDates: false,
44+
forecastDateFormat: "ddd", // format for forecast date display, e.g., "ddd" = Mon, "dddd" = Monday, "D MMM" = 18 Oct
4445
hourlyForecastIncrements: 1
4546
},
4647

0 commit comments

Comments
 (0)