4 ms·
Maybe not what the article is exactly talking about, but `cal` will give you a calendar in terminal. `cal -3` will give you each surrounding month, and `cal 202
by ydnaclementine 4y ago
Maybe not what the article is exactly talking about, but `cal` will give you a calendar in terminal. `cal -3` will give you each surrounding month, and `cal 2022` will give you the full year
- tlavoie 4y agoOne of my earliest computing-adjacent exposures was going into my dad's office as a kid. Besides getting to type random things on punch-cards, we'd typically bring home these line-printer calendars with a Snoopy (or whatever) ASCII-art pic at the top.
- adamrmcd 4y agoOften I use cal to find the previous or next month. I never understood why two parameters it assumes `cal mm yyyy` but when one parameter is provided assumes `cal yyyy` instead of `cal mm`. ie, I just want to see April of this year: but `cal 4` returns Jan-Dec 0004 CE <!> `cal -3` is perfect!
- lapsis_beeftech 4y agoYour cal likely also recognizes month names, try "cal apr" for April of this year.
- mandelbrotwurst 4y agoMine does not ~ $ cal apr cal: year `apr' not in range 1..9999
- lapsis_beeftech 4y agoWhich cal? It is a relatively simple program that has seen many implementations and extensions. The cal I had in mind was the version from the util-linux package, it is commonly found in Linux distributions and supports full or abbreviated month names as arguments.
- mandelbrotwurst 4y agoGotcha. This is the one pre-installed on MacOS 11.6.
- irishsultan 4y ago`cal -m 4` should work for that as well.
- behnamoh 4y agowish it had hyperlinks so that clicking on them would open up the date events. speaking of, cal is just a calendar. It doesn't have events anyway.
- alatkins 4y agoHow did I not know about cal after 20+ years of using UNIX-based systems?! Very useful!
- oh_sigh 4y ago`curl wttr.in` is my preferred `cal`
- prezjordan 4y ago`cal 9 1752`
- heresie-dabord 4y agoThe related command ncal can provide $WeekNumber with Monday as start day: ncal -b -M -w -B 1 -A 1
- tomchuk 4y agoI have a shell function I use all the time to keep track of both calendar and timezones where our teams are located now() { cal -3 echo echo -n "Local: " date --rfc-3339=s echo -n "UTC: " date -u --rfc-3339=s echo -n "New York " TZ='America/New_York' date --rfc-3339=s echo -n "London: " TZ='Europe/London' date --rfc-3339=s echo -n "New Zealand: " TZ='Pacific/Auckland' date --rfc-3339=s }