Make clock's alt format include the ISO week number

Set the default formatAlt to "dd MMMM 'W'ww yyyy" (was "dd MMMM yyyy")
in shell-defaults.json, the bundled settings-panel defaults, and the
form placeholder text — clock's own widget fallback already used this
spec but the shipped config overrode it.

Qt.formatDateTime doesn't recognize `ww` and renders it literally
(`20 May Www 2026`), so add an `isoWeek` helper to clock.qml that
pre-substitutes `ww` with a Qt-quoted literal of the ISO 8601 week
number before handing the format off to Qt. Users get `20 May W21 2026`
without anyone needing to know about the substitution.
This commit is contained in:
David Heinemeier Hansson
2026-05-20 21:37:48 +02:00
parent 2b03aec510
commit 3878ad3a57
3 changed files with 27 additions and 6 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
{
"id": "clock",
"format": "dddd HH:mm",
"formatAlt": "dd MMMM yyyy",
"formatAlt": "dd MMMM 'W'ww yyyy",
"verticalFormat": "HH\n\u2014\nmm"
},
{