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.

Author belopolsky
Recipients Retro, belopolsky, eric.araujo, georg.brandl, pjenvey, r.david.murray, shadikka, terry.reedy
Date 2010-10-18.16:38:52
SpamBayes Score 4.235637e-09
Marked as misclassified No
Message-id <AANLkTimU80_Bg-CJ5JqObKgLvOUM=qb+bH4kE1RrVkUn@mail.gmail.com>
In-reply-to <1287345265.27.0.958642819907.issue10073@psf.upfronthosting.co.za>
Content
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.
History
Date User Action Args
2010-10-18 16:38:54belopolskysetrecipients: + belopolsky, georg.brandl, terry.reedy, pjenvey, eric.araujo, Retro, r.david.murray, shadikka
2010-10-18 16:38:52belopolskylinkissue10073 messages
2010-10-18 16:38:52belopolskycreate