d davlgd ~/blog/posts/2025-12-31-cal-1752.md

cal 9 1752: the eleven days that never existed

The month with a hole in it

Every UNIX ships a calendar. Ask it for September 1752 and it gives you a month with a hole in the middle:

bash
$ cal 9 1752
   September 1752
Su Mo Tu We Th Fr Sa
       1  2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

The 2nd is followed by the 14th. Eleven days are missing, and this is not a bug. Your terminal is telling you about a piece of eighteenth century legislation.

Eleven days removed by law

The Julian calendar assumed a year of 365.25 days. It is about eleven minutes too long, and over sixteen centuries those minutes added up to a visible drift against the equinoxes. The Gregorian reform fixed the rule in 1582, and correcting the accumulated error meant deleting days from the calendar once.

Britain and its colonies did not adopt it until 1752, by which point the gap had grown to eleven days. The Act made Wednesday 2 September 1752 be followed directly by Thursday 14 September. Nothing happened in between, because there was no in between.

cal models this faithfully. It is not printing a generic grid, it is printing the calendar that was legally in force.

Your terminal has an opinion about which country you are in

Here is the part I did not expect. The eleven day gap is the British answer, and cal defaults to it. Other countries switched on other dates, and ncal -p lists them:

bash
$ ncal -p
 AT Austria        1583-10-05      IT Italy          1582-10-04
 AU Australia      1752-09-02      JP Japan          1918-12-18
 BE Belgium        1582-12-14      RU Russia         1918-01-31
 GB United Kingdom 1752-09-02      TR Turkey         1926-12-18
 GR Greece         1924-03-09     *US United States  1752-09-02

Thirty-four countries, four centuries of disagreement, and a * marking the default. Russia held out until 1918, Turkey until 1926.

-s picks one, and the hole moves. Note that ncal transposes the grid: weekdays run down the left, and a week is a column instead of a row.

bash
# France switched in December 1582, losing ten days
$ ncal -s FR -m 12 1582
    December 1582
Su     2  9 26
Mo     3 20 27
Tu     4 21 28
We     5 22 29
Th     6 23 30
Fr     7 24 31
Sa  1  8 25

Read down the third column. That column is one week: Sunday the 9th, then Monday the 20th. Italy, first to adopt, lost ten days in October of that same year:

bash
$ ncal -s IT -m 10 1582
    October 1582
Su    17 24 31
Mo  1 18 25
Tu  2 19 26
We  3 20 27
Th  4 21 28
Fr 15 22 29
Sa 16 23 30

Thursday the 4th, then Friday the 15th. Three commands, three different histories, all correct.

Week numbers, and a disagreement

ncal -w adds a row of week numbers under the grid. Useful if you work anywhere that plans by week number, and a small trap if you assume both your machines agree:

bash
$ ncal -w -m 1 2026
    January 2026
Su     4 11 18 25
Mo     5 12 19 26
Th  1  8 15 22 29
Sa  3 10 17 24 31
   53  1  2  3  4

That is Linux. The same command on macOS numbers the first column 1, not 53. The reason is visible one line higher: macOS starts its weeks on Monday and puts Mo in the first row, Linux starts on Sunday. January 1st 2026 is a Thursday, so with a Monday start its week is the first of the new year, and with a Sunday start that column began on December 28th and still belongs to the old one.

ISO 8601 defines weeks as starting on Monday, so macOS is the one matching the standard here:

bash
$ date -j -f '%Y-%m-%d' 2026-01-01 '+%A, ISO week %V'
Thursday, ISO week 01

Note that -w belongs to ncal alone. cal -w prints a usage error on both systems.

Where it lives

macOS ships cal and ncal in /usr/bin, and both accept -s. I ran every example above on macOS and Ubuntu 25.10 and got identical output, byte for byte.

Ubuntu does not install it by default:

bash
sudo apt install ncal

The package is called ncal and it provides both commands. Note that cal --version fails on both systems with invalid option, so do not go looking for it.

Two flags worth keeping. cal -3 prints last month, this month and next. That is the layout I actually want most of the time. And ncal is worth having in the muscle memory for its -s, even if the transposed grid takes a moment to read.

One caveat if you script around this: cal is locale aware. My first run printed Septembre with French day names, and any parsing of that output breaks the moment it runs on a machine set to a different language. Prefix with LC_ALL=C when the output feeds anything but a human.

jump to the previous / next post

up 3y · 68 posts · last Aug 31, 2026 rss · github · framagit · bluesky · x · linkedin © 2026 davlgd · no tracking · hand-rolled