In my last blog post, I provided a BASH function that can operate as a lightweight replacement for cal. When I say "replacement", I mean, it just gives cal a bit of a facelift by making it pretty.
I'm here today to post a patch to that function. The regex got wonky when matching 20 or 21, so the header with the month and the year got dirty.
I also got tired of seeing the double-spaces at the end of the current week. That has only been an issue with the Apple version of cal. However, with some regex revisions, we arrive at a once again pretty, pretty cal(endar).
Somehow, my blog got marked as a malware-potential-phishing-don't-go-there-it's-Knockturn-Alley (please don't sue me, J.K.!) website because of my last post. To avoid this from happening again, I'm instead going to post links to the scripts and the patch (so you can see the diff).
I have tested this out quite thoroughly on macOS and Linux, but do keep in mind that YMMV.
Again, standard attribution CC license applies to this code.
Link #1: v1 of the function
Link #2: v2 of the function
Link #2: The patch file
Until next time ...