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 bnahas
Recipients
Date 2007-01-24.23:00:30
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Python 2.4.1 (#1, May 16 2005, 15:19:29)
[GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from time import strptime
>>> strptime('2006-53-0', '%Y-%U-%w')
(2006, 12, 31, 0, 0, 0, 6, 365, -1)
>>> strptime('2007-00-0', '%Y-%U-%w')
(2006, 12, 24, 0, 0, 0, 6, -7, -1)
>>> strptime('2007-01-0', '%Y-%U-%w')
(2007, 1, 7, 0, 0, 0, 6, 7, -1)
>>> strptime('2007-02-0', '%Y-%U-%w')
(2007, 1, 7, 0, 0, 0, 6, 7, -1)
>>> strptime('2007-03-0', '%Y-%U-%w')
(2007, 1, 14, 0, 0, 0, 6, 14, -1)
>>>


Note that in the above test, Sunday of week 1 and week 2 for 2007 reported the date as 2007-01-07 and Sunday of week 0 was reported as 2006-12-24, not 2006-12-31.  I'm not sure exactly what is correct, but the inconsistencies are bothersome.

Same results on:
Python 2.4.4c1 (#70, Oct 11 2006, 10:59:14) [MSC v.1310 32 bit (Intel)] on win32
History
Date User Action Args
2007-08-23 14:51:33adminlinkissue1643943 messages
2007-08-23 14:51:33admincreate