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.
Created on 2012年02月18日 09:00 by bannerts, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg153635 - (view) | Author: Scott Bannert (bannerts) | Date: 2012年02月18日 09:00 | |
Note: this is my first time to submit a bug or use this system I might have found an issue with the calendar related to the point of time in history when the date was necessary to correct by 11 days. Anyhow, the correction is made in a GNU+linux machine, so it seems like something worth fixing in python. How I discovered it: I was reading through some posts on reddit when I came up on this one: http://www.reddit.com/r/linux/comments/9jl2t/1_open_a_linux_terminal_2_enter_cal_9_1752_3_shit/ which seemed to state that in the September of 1752, they decided to skip from Wednesday the 2nd to Thursday the 14th. Out of curiosity, I decided to see if Python had it recorded this way by typing in the following commands in python: >>> import calendar >>> calendar.TextCalendar().pryear(1752) It was not corrected for the two versions of python I tried using (2.7 and 3.2). |
|||
| msg153637 - (view) | Author: Mark Dickinson (mark.dickinson) * (Python committer) | Date: 2012年02月18日 10:33 | |
This is documented behaviour: see http://docs.python.org/library/calendar.html """Most of these functions and classes rely on the datetime module which uses an idealized calendar, the current Gregorian calendar indefinitely extended in both directions. This matches the definition of the "proleptic Gregorian" calendar in Dershowitz and Reingold’s book "Calendrical Calculations", where it’s the base calendar for all computations.""" Also note that things get messy if you try to correct this: the 1752 correction that you refer to applies mainly to the British calendar, and it would be a little rude to impose that correction on Python users worldwide :-) For other countries there are various adoption dates for the Gregorian calendar, and various corresponding corrections (e.g., Greece dropping 13 days in 1923). No idea how GNU/Linux handles this; what happens when you try 'cal 1923' on a machine with Greek locale settings? So at best this is a feature request, but as a feature request it would need either significant discussion (the python-ideas list may be a good place for this), or at least an explicit suggestion of exactly how things should be changed. Closing as invalid for now. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:26 | admin | set | github: 58256 |
| 2021年12月04日 06:00:06 | terry.reedy | link | issue45971 superseder |
| 2012年02月18日 10:33:33 | mark.dickinson | set | status: open -> closed nosy: + mark.dickinson messages: + msg153637 resolution: not a bug |
| 2012年02月18日 09:00:49 | bannerts | create | |