2 ms·
The APL code (posted by rak1507) wins my admiration too. Now, given that this confounded problem has taken too much of my time @^_^@ I'll just say that the sim
by heresie-dabord 5y ago
The APL code (posted by rak1507) wins my admiration too.
Now, given that this confounded problem has taken too much of my time @^_^@ I'll just say that the simplest option seems to be
ncal -w -3 -y -b -h
because it already computes the week numbers. Fiddle away with sed afterward.
By the way, the "fold" utility [1] can help here too:
ncal -w -3 -y -b -h | sed 's/ /*/g' | fold -w 27
Cheers!
[1] https://en.wikipedia.org/wiki/Fold_(Unix) https://en.wikipedia.org/wiki/Fold_(Unix)