Message119036
On Sun, Oct 17, 2010 at 3:54 PM, Boštjan Mejak <report@bugs.python.org> wrote:
..
> About the if year == 0 check... Well, read Wikipedia's article http://en.wikipedia.org/wiki/0_(year) which clearly
> states that "Year zero does not exist in the widely used Gregorian calendar or in its predecessor, the Julian
> calendar." So we raise a ValueError if this value is used in the calendar.isleap() function.
>
Well, Wikipedia is not the most authoritative source, but if you go
the right article there, you will find that
"""
Mathematically, it is more convenient to include a year zero and
represent earlier years as negative, for the specific purpose of
facilitating the calculation of the number of years between a negative
(BC) year and a positive (AD) year. This is the convention used in
astronomical year numbering and in the international standard date
system, ISO 8601. In these systems, the year 0 is a leap year.[2]
"""
Python documentation states that calendar module implements 'the
“proleptic Gregorian” calendar in Dershowitz and Reingold’s book
“Calendrical Calculations”'. See
http://docs.python.org/dev/py3k/library/calendar.html
I don't have Dershowitz and Reingold’s book to check, but ISO/FDIS
8601:2000(E) standard contains a note that states: "In the prolaptic
[sic] Gregorian calendar the calendar year [0000] is a leap year."
In any case, I think there are more important issues with the calendar
module than perceived bugs in isleap() function. See for example
issue 10087. |
|
Date |
User |
Action |
Args |
2010-10-18 16:38:54 | belopolsky | set | recipients:
+ belopolsky, georg.brandl, terry.reedy, pjenvey, eric.araujo, Retro, r.david.murray, shadikka |
2010-10-18 16:38:52 | belopolsky | link | issue10073 messages |
2010-10-18 16:38:52 | belopolsky | create | |
|