• Problem with calendar module

Question related to mission The Most Frequent Weekdays



The Python calendar module, and this task, don't take account of Gregorian Reform (in 1582, adopted in 1752 in Britain).

Before the reform a year was a leap year if divisible by 4. After the reform, if divisible by 4 and not by 100, or by 400.

So the tests are wrong for year 1752 and before (using english date for the reform). Take a look at the Unix command :

    $ cal 1084

which gives Monday and Tuesday for 1084/1/1 and 1084/12/31

More curious, in 1752 (the day after September 2nd was September 14th), the most frequent days were Wednesday, Thursday, Friday, Saturday and Sunday.

Perhaps make the task begin in 1800.

Nevertheless, nice task