Today is 2019-07-17 and I want gcal
to show the calendar for the current month along with the iso week numbers for the respective weeks.
$ gcal --correct-parammeters
July 2019
Mo Tu We Th Fr Sa Su CW
1 2 3 4 5 6 7 27
8 9 10 11 12 13 14 28
15 16 17 18 19 20 21 29
22 23 24 25 26 27 28 30
29 30 31 31
The correct iso week number for today can easily be confirmed with
$ date --date="2019-07-17" +%V
29
With gcal %20190717 --starting-day=Monday
I get the correct order of weekdays but no CW
column.
Adding --with-week-number
(or -K
) gives:
July 2019
Mo Tu We Th Fr Sa Su CW
1 2 3 4 5 6 7 26
8 9 10 11 12 13 14 27
15 16 17 18 19 20 21 28
22 23 24 25 26 27 28 29
29 30 31 30
where the week number is off by one.
There is also --iso-week-number=yes
but no CW
column is shown then
gcal --with-week-number --iso-week-number=yes
produces aCW
column with27
for the first week - but then repeats27
for the second week (and is off by one for the remainder).gcal --with-week-number --iso-week-number=yes --starting-day=1
appears to work "right" - perhaps this is related? [Bug-gcal] gcal, -K and --iso-week-number – steeldriver Jul 17 '19 at 16:31--with-week-number
and--iso-week-number=yes
where exclusive and never tried both (there really should be an error message when using--iso-week-number
without--with-week-number
).I have the same gcal version (and the same behaviour for your first command). The second command works for me as well.
If you turn it into an answer I will accept it. – user2740 Jul 17 '19 at 16:55