Week numbers in Bash
How to get the current week number
To get the ISO week number (1-53) for today, use date +%-V
.
To get the corresponding four-digit year (e.g. 2024), use date +%-G
.
Read more
Learn more about week numbers and the ISO week numbering scheme in this little primer.