[issue3336] datetime weekday() function

ryanboesch report at bugs.python.org
Thu Jul 10 21:39:49 CEST 2008


New submission from ryanboesch <ryanboesch at gmail.com>:

Leap year ignored each century (2100, 2200, 2300, etc.) except 2000 for
the weekday() function. This code reproduces the error:

import datetime
datetime.date(2100,2,29).weekday()

Error message:
ValueError: day is out of range for the month

Also, this causes the weekday to be 1 day off from March 1st, 2100 to
February 28th 2200 and 2 days off...

----------
messages: 69517
nosy: ryanboesch
severity: normal
status: open
title: datetime weekday() function
type: behavior
versions: Python 2.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3336>
_______________________________________


More information about the Python-bugs-list mailing list