- Today’s date
$ LC_TIME="en.GB.UTF8" date --iso-8601
2025-01-12
- Today’s date (day of the week
$ LC_TIME="en.GB.UTF8" date +%u
7
$ LC_TIME="en.GB.UTF8" date +%a
Sun
Issue
- Since, week starts from Monday to Sunday, this week monday should be 2025-01-06
$ LC_TIME="en_GB.UTF-8" date -d "this-week-monday" --iso-8601
2025-01-13
$ LC_TIME="en_IE.UTF-8" date -d "this-week-monday" --iso-8601
2025-01-13
$ LC_TIME="en_IN.UTF-8" date -d "this-week-monday" --iso-8601
2025-01-13
$ LC_TIME="en_US.UTF-8" date -d "this-week-monday" --iso-8601
2025-01-13
$ LC_TIME="en_DE.UTF-8" date -d "this-week-monday" --iso-8601
2025-01-13
$ LC_TIME="en_JP.UTF-8" date -d "this-week-monday" --iso-8601
2025-01-13
$ LC_TIME="en_DK.UTF-8" date -d "this-week-monday" --iso-8601
2025-01-13
$ LC_TIME="en_CA.UTF-8" date -d "this-week-monday" --iso-8601
2025-01-13
$ LC_TIME="en_AU.UTF-8" date -d "this-week-monday" --iso-8601
2025-01-13
EDIT
Another observation
I did this today on 2025-01-13 (in Germany)
$ LC_TIME="en_AU.UTF-8" date -d "this-week-sunday" --iso-8601
2025-01-19
$ LC_TIME="en_AU.UTF-8" date -d "last-week-sunday" --iso-8601
2025-01-12
$ LC_TIME="en_AU.UTF-8" date -d "next-week-sunday" --iso-8601
2025-01-26
Issue
So, today it seems to be giving partly correct results. What is wrong from today’s output: if from yesterday’s output this-week-monday
was 2025-01-13
so somehow computer was counting Sunday as the first day of the week in every locale (that I showed above). So then "this-week-sunday"
should be yesterday and not 2025-01-19 (as shown today).
Summary
Yesterday
$ LC_TIME="en_GB.UTF-8" date -d "this-week-monday" --iso-8601
2025-01-13
Today
env -i bash --norc --noprofile
bash-5.2$ LC_TIME="en_AU.UTF-8" date -d "this-week-sunday" --iso-8601
2025-01-19
Issue: So if yesterday (2025-01-12, Sunday), this-week-monday
was 13th then, today this-week-sunday
should be yesterday and not 2025-01-19
Why am I getting the wrong date output?