How do I make Terminal/UNIX tools to start the week on Sunday?

i know this seems like a locale problem -- i spent of bunch of time looking into that but it turns out this is actually a problem with the date command.

from the man page for date:

%U     week number of year, with Sunday as first day of week (00..53)
%W     week number of year, with Monday as first day of week (00..53)

so if i rewrite your command to use %U instead of %W:

for i in $(locale -a); do bash -c "LC_TIME=$i date -j -f '%Y-%m-%d' '2020-01-05' '+%U %a'" ; done

then i am getting all of the results showing week 01 instead of 00. hope this helps!