Why does calendar produce the wrong output?

Why does calendar produce the wrong output?

Frequently, people find that the output for the Unix calendar
program, 'cal' produces output that they do not expect.

The calendar for September 1752 is very odd:

September 1752
S M Tu W Th F S
1 2 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

This is the month in which the US (the entire British Empire actually)
switched from the Julian to the Gregorian calendar.

The other common problem people have with the calendar program is
that they pass it arguments like 'cal 9 94'. This gives the calendar
for September of AD 94, NOT 1994.



Home FAQ