Week number of year is incorrect

Describe the bug
Jan 4th, 2021 should be Week #1 according to ISO8601. When using the Date / Time Widget, the 'w' format shows incorrectly.

Week Numbers for 2021 has the correct date. BTT shows that it pulls the format from UTS #35: Unicode LDML: Dates , but it seems to be implemented incorrectly.

Screenshots


Screenshot of touch bar, showing date and week #. Jan 4th, 2021 should be Week #1 according to ISO8601

Device information:

  • Type of Mac: MacBook Pro (15-inch, 2017)
  • macOS version: macOS Catalina 10.15.7
  • BetterTouchTool version: 3.505

I ended up writing a script instead of using the widget.

For example, you can show such as 'W01 Jan 06 13:07' with this command:

echo "W$(date +"%U %b %d %H:%M")"

@jp128 same here! Just realized I've been writing the CW wrong for 2 months :man_facepalming:
Any ideas on how to fix it from within bettertool?

Ah, this seems to be about how macOS calculates week numbers by default. I'll change it to ISO8601 because that seems to be more common.

I did what @Sanghyun_Lee mentioned.

echo "W$(date +"%U %b %d %H:%M")"

2 Likes

the latest alpha version does iso 8601 by default!

2 Likes