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:
@@ -132,7 +132,7 @@ Item {
|
||||
layout: {
|
||||
left: [{ id: "omarchy" }, { id: "workspaces" }],
|
||||
center: [
|
||||
{ id: "clock", format: "dddd HH:mm", formatAlt: "dd MMMM yyyy", verticalFormat: "HH\n\u2014\nmm" },
|
||||
{ id: "clock", format: "dddd HH:mm", formatAlt: "dd MMMM 'W'ww yyyy", verticalFormat: "HH\n\u2014\nmm" },
|
||||
{ id: "weather" }, { id: "indicators", items: [ "dnd", "nightlight", "stayAwake", "screenrecording", "dictation" ] }, { id: "systemUpdate" }
|
||||
],
|
||||
right: [
|
||||
@@ -1205,7 +1205,7 @@ Item {
|
||||
}
|
||||
ClockField {
|
||||
fieldKey: "formatAlt"
|
||||
text: clockForm.entry.formatAlt || "dd MMMM yyyy"
|
||||
text: clockForm.entry.formatAlt || "dd MMMM 'W'ww yyyy"
|
||||
}
|
||||
|
||||
Text {
|
||||
|
||||
Reference in New Issue
Block a user