Closed theniwo closed 1 month ago
Depending on what standard is used for week number, 0 is sometimes acceptable. From the GNU date man page:
%U week number of year, with Sunday as first day of week (00..53)
%V ISO week number, with Monday as first day of week (01..53)
...
%W week number of year, with Monday as first day of week (00..53)
The list of Available pattern components does not include U
or V
(they render blank and undefined
respectively). The listed w
(week of year) and W
(week of month) components do not correspond with the GNU date format sequences %w
(day of week) and %W
(week number of year). I guess that this extensions maps the w
component to the %W
sequence. However, the extension shows a link to a Full list (web) which instructs to use the w
symbol to get the ISO 8601 week number, in conjunction with the Y
symbol for the corresponding year, that may differ from calendar year ‘y’ near a year transition. The ISO 8601 week number is never zero.
I have tried changing the used locale, but it had no effect on the week number. So how can I make this extension display the ISO 8601 week number? That is what we use in the Netherlands, and most of Europe, Asia and Oceania.
I have the same problem, it should display week 5 today, but it shows week 4, and I can't get it to show anything but 4 or ?, messing with the system locale changes nothing.
Having the same issue since the beginning of the year - has anyone found a workaround for this by now? @marcinjakubowski Any plans on looking into this? :)
I too am looking for this to be displayed using ISO 8601 Week Numbering
I saw that @bomdia did some great work on the formatter, but it appears I am running an older version of the extension that does not yet include the "added support for advanced formatters". I am running Ubuntu 22.04 with Gnome version 42.9 and I have used the gnome-shell-extension-manager
to install the Date Menu Formatter extension, which seems to be stuck on version 10 because of the old Gnome version. Other than waiting for the release of Ubuntu 24.04, I have no workaround yet.
Okay I did find a workaround, by switching over to the "Panel Date Format" which uses a subset of the strftime()
format language, including %V
for the ISO 8601 week number. It works on Gnome shell versions up to 44 but not 45 yet, so I promise I will be back to this extension as soon as I can :wink:
Maybe the others in this thread can also check which version of the extension and Gnome they are running, to help determine whether the issue still exists. I was able to see the extension version in the extension manager.
I'm running gnome 44.1 with extension 10. vV
only shows up as "undefined"
@rhuijts not sure what you mean by switching over to the Panel Date Format
It's working correctly under Gnome shell 45 using the "Luxon" formatter. (This was not available in Gnome 44)
Yes, with Gnome 45 it works.
My string is![image](https://github.com/marcinjakubowski/date-menu-formatter/assets/58772363/8d82e126-6d84-45c0-8ca2-980af95c40ce)
EEE, MMM.d.y - 'KW:' ww - kk:mm:ss
and it showsNo change if I only put a single
w
When I put
W
I get?
I am expecting
w
andww
to render as1
and01
for the first week in europe.