[issue14423] Getting the starting date of iso week from a week number and a year.
Antoine Pitrou
report at bugs.python.org
Mon Apr 9 23:29:08 CEST 2012
Antoine Pitrou <pitrou at free.fr> added the comment:
Some comments:
- you also need to modify the C version in Modules/_datetimemodule.c
(make sure the tests exercise both versions!)
- the doc needs a "versionadded" tag
- I don't understand this:
+ if self.isocalendar()[1] != 1:
+ if self.weekday() > 3: # Jan 1 is not in week one
+ self += timedelta(7 - self.weekday())
What if self.weekday() <= 3 ? Surely some adjustment is needed as well?
(you should probably add more tests to cover the various cases)
- this comment:
+ # Test that we get the OverflowError when the year has 52 weeks
seems wrong since ValueError is raised
----------
nosy: +pitrou
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14423>
_______________________________________
More information about the Python-bugs-list
mailing list