cal(1) command outputs wrong data in September 1752, so all date data before that is also wrong. > $ 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 > > > > $ uname -r > 12.0-RELEASE
It is not immediately clear to me if this is actually broken. Here is the POSIX definition of the behavior around September 1752: > The cal utility shall write a calendar to standard output using the Julian > calendar for dates from January 1, 1 through September 2, 1752 and the > Gregorian calendar for dates from September 14, 1752 through December 31, 9999 > as though the Gregorian calendar had been adopted on September 14, 1752.
Ah, I forgot to cite my source: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cal.html
Oh, I was wrong that is not broken https://en.wikipedia.org/wiki/1752#September > In the British Empire, it was the only year with 355 days, as 3–13 September were skipped when the Empire adopted the Gregorian calendar. Thank you Conrad for your explanation!
util-linux's cal(1) is unfortunately not an independent implementation for comparison purposes — it's at least derived from BSD cal (and produces same result, without extra options). Some more reading from our cal.1 page: -p Print the country codes and switching days from Julian to Gregorian Calendar as they are assumed by ncal. The country code as determined from the local environment is marked with an asterisk. -s country_code Assume the switch from Julian to Gregorian Calendar at the date associated with the country_code. If not specified, ncal tries to guess the switch date from the local environment or falls back to September 2, 1752. This was when Great Britain and her colonies switched to the Gregorian Calendar. ... BUGS The assignment of Julian–Gregorian switching dates to country codes is historically naive for many countries. And from util-linux' cal.1: Two different calendar systems are used, Gregorian and Julian. These are nearly identical systems with Gregorian making a small adjustment to the frequency of leap years; this facilitates improved synchronization with solar events like the equinoxes. The Gregorian calendar reform was introduced in 1582, but its adop‐ tion continued up to 1923. By default cal uses the adoption date of 3 Sept 1752. From that date forward the Gregorian calendar is displayed; previous dates use the Julian calendar system. 11 days were removed at the time of adop‐ tion to bring the calendar in sync with solar events. So Sept 1752 has a mix of Julian and Gregorian dates by which the 2nd is followed by the 14th (the 3rd through the 13th are absent). Optionally, either the proleptic Gregorian calendar or the Julian calendar may be used exclusively. See --reform below. (N.B., our cal does not have this --reform date option.) --reform val This option sets the adoption date of the Gregorian calendar reform. Calendar dates previous to reform use the Julian calendar system. Calen‐ dar dates after reform use the Gregorian calendar system. The argument val can be: · 1752 - sets 3 September 1752 as the reform date (default). This is when the Gregorian calendar reform was adopted by the British Empire. · gregorian - display Gregorian calendars exclusively. This special placeholder sets the reform date below the smallest year that cal can use; meaning all calendar output uses the Gregorian calendar system. This is called the proleptic Gregorian calendar, because dates prior to the calendar system's creation use extrapolated values. · iso - alias of gregorian. The ISO 8601 standard for the representation of dates and times in information interchange requires using the pro‐ leptic Gregorian calendar. · julian - display Julian calendars exclusively. This special place‐ holder sets the reform date above the largest year that cal can use; meaning all calendar output uses the Julian calendar system.
Cheers! Changing calendar systems is crazy, but happily we do not have to reference the 18th century often. :-)