This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: calendar module does not recognize switch to Gregorian
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: duplicate
Dependencies: Superseder: calendar bug related to September 2-14, 1752
View: 14048
Assigned To: Nosy List: christian.heimes, ssv5088, veky
Priority: normal Keywords:

Created on 2021-12-03 07:26 by ssv5088, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg407567 - (view) Author: Venkata Raman S S V (ssv5088) Date: 2021-12-03 07:26
In Ubuntu 20.04.3 LTS  -  OS Type: 64-bit.

$ cal sep 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  

--------------------------------

$ python3
Python 3.8.10 (default, Sep 28 2021, 16:10:42) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import calendar as cl
yy=1752
mm=9

print(cl.month(yy,mm))
   September 1752
Mo Tu We Th Fr Sa Su
             1  2  3
 4  5  6  7  8  9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 

Note: Sep. 1752 had only 19 days. ( 11 days skipped )
msg407568 - (view) Author: Vedran Čačić (veky) * Date: 2021-12-03 07:49
https://docs.python.org/3/library/calendar.html#module-calendar

The functions and classes defined in this module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions.

https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar

Even if we decide to change this, this is the thing locale should worry about: not every place adopted Gregorian Calendar at the same time, nor in the same way.
msg407586 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-12-03 13:39
> Note: Sep. 1752 had only 19 days. ( 11 days skipped )

That statement is only correct for countries where the Church of England was predominant: Great Britain and colonies of the British Empire in e.g, North America (later known as US of A). Alaska changed later when Russia sold it to the US.

Catholic countries such as Italy, Spain, Portugal, and France adopted the Gregorian calendar 170 years earlier. For Germany it gets really complicated and depends on county, kingdom, and the current religion of sovereign.
History
Date User Action Args
2022-04-11 14:59:53adminsetgithub: 90129
2021-12-04 06:00:06terry.reedysetstatus: open -> closed
title: calendar module issue -> calendar module does not recognize switch to Gregorian
superseder: calendar bug related to September 2-14, 1752
resolution: duplicate
components: + Library (Lib), - Extension Modules
type: behavior
stage: resolved
2021-12-03 13:39:48christian.heimessetnosy: + christian.heimes
messages: + msg407586
2021-12-03 07:49:23vekysetnosy: + veky
messages: + msg407568
2021-12-03 07:26:06ssv5088create