This article is part of the “Meta Advent 2019” series. I’ve committed to writing a new blog post here every day until Christmas.
You know what’s the most important thing during the Advent? You’re totally right - that’s having
a good calendar where you can constantly check the time left until Christmas.
Today we’ve got all sorts of fancy calendars - GUI apps, web apps, mobile apps… I hate them all!1
Perhaps I’m just a bitter man stuck in the past, but I really prefer to interact with
simpler and more hacker-friendly calendars. My favourite calendars are one that comes with Emacs2 and
If I’m in Emacs and I need the calendar I’d just do
M-x calendar and that’s it.
The rest of the time3 I’d just summon quickly my terminal with
C-~4 and invoke
As Emacs hasn’t achieved world dominance yet, I’ll focus on
cal for the remainder of this article.
cal looks like this:
cal is quite flexible and here I’ll share my favourite ways of using it:
- Show the previous and the following months -
- Show the entire calendar for the current year -
- Show the entire calendar for some year -
cal -y 2020
- Show some specific month -
cal -m 5. You can prefix the month with
previous. Useful if you want to check some month in an adjacent year.
Now let’s see
cal in action!
ncal command is pretty similar, but displays the calendar a bit differently and has flags to show
the date of Easter (amongst other features):
$ ncal -e 2020 # Catholic Easter April 12 2020 $ ncal -o 2020 # Orthodox Easter April 19 2020
Generally I use
cal mostly because I’m too lazy to type one extra character or alias
You can learn more about the two commands here.
Time to wrap it up for today. I hope this post will make it easier for you to keep track of the days until Christmas and that it showed you a bit of the beauty, simplicity and elegance of command-line tools. See you soon!