Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

In calendar weeks formatting, the ISO "weeks" tag {:%V} has no effect

Open tjavdar opened this issue 1 year ago • 4 comments

In format the tag {:%V}is admissible but has no effect. That is, the readout of week numbers on the bar and the pop-up calendar differ by 1:

  "clock": {
      "format": "{:%a, %b %d, v.%V | %H:%M}",
      "calendar": {
         "locale": "sv_SE",
         "format": {
           "weeks": "<span color='#99ffdd'><b>{:%V}</b></
         },
       },
  }

This config on: waybar 0.10.4-2 (Arch) Linux i5 6.10.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Sat, 27 Jul 2024 16:49:55 +0000 x86_64 GNU/Linux LANG=en_US.UTF-8

IMHO, the readout of "weeks" for {:%U}, {:%W} and {:%V} should match the one from the corresponding shell command:

   `date +%U`
   `date +%V`
   `date +%W`

tjavdar avatar Aug 04 '24 08:08 tjavdar

I just tried out "weeks": "<span color='#99ffdd'><b>{:%V}</b></span>" and it fixes the "off by one" problem, thank you :D

PS: It seems that you are not closing the </span> in your example. Perhaps that is the issue?

amrsoll avatar Feb 07 '25 08:02 amrsoll

Thanks for your response,

No, my is actually closed in my config file, I must have just copied it partly. So this is not the problem.

I tied to change {:%W} -> {:%V} as you suggested and restarted waybar with "weeks": "<span color='#99ffdd'><b>{:%V}</b></span>", in my config. To no avail, Today, Feb 7, which is ISO week 6, confirmed at terminal by running

´ $ date "+%a, %b %d (%F), v.%V

Fri, Feb 07 (2025-02-07), v.06 ´ still, the year calendar of waybar still shows, ugh..., week 5.

tjavdar avatar Feb 07 '25 15:02 tjavdar

I have the same issue, and oddly enough, it works in the actual format. %V in the format currently gives me 22 while %V in the calendar gives me 21 right now.

dasJ avatar May 30 '25 20:05 dasJ