[Tracker-discuss] [issue620] "calendar" with python 2.7.13 does not handle leap year properly
Ron Lee Pound
metatracker at psf.upfronthosting.co.za
Tue Mar 21 16:23:36 EDT 2017
Ron Lee Pound added the comment:
Very sorry, my mistake.I will be more carefull next time. TNX
On Tue, Mar 21, 2017 at 1:14 PM, Zachary Ware <
metatracker at psf.upfronthosting.co.za> wrote:
>
> Zachary Ware added the comment:
>
> This is not the correct tracker for Python bugs, that tracker is
> bugs.python.org. This tracker is for issues with bugs.python.org (aka
> the meta tracker).
>
> No need to file this issue at b.p.o, though; the calendar module is
> correct. Years evenly divisible by 4 are leap years, except years evenly
> divisible by 100 which are not leap years, except years evenly divisible by
> 400 which *are* leap years.
>
> >>> calendar.isleap(1896)
> True
> >>> calendar.isleap(1900)
> False
> >>> calendar.isleap(1904)
> True
> >>> calendar.isleap(1996)
> True
> >>> calendar.isleap(2000)
> True
> >>> calendar.isleap(2004)
> True
>
> ----------
> nosy: +zach.ware
> status: unread -> resolved
> topic: -tracker
>
> _______________________________________________________
> PSF Meta Tracker <metatracker at psf.upfronthosting.co.za>
> <http://psf.upfronthosting.co.za/roundup/meta/issue620>
> _______________________________________________________
>
_______________________________________________________
PSF Meta Tracker <metatracker at psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue620>
_______________________________________________________
More information about the Tracker-discuss
mailing list