Erik Cederstrand <[email protected]> added the comment:
I respectfully disagree. I take strptime('2002 01 1', '%Y %V %u') as mening
"first day of first week in the year 2002"
There is only one date that corresponds to the first day of the first week of
2002, i.e. Dec. 31, 2001. If you specify the first day of the first week of
2001 instead, then that's another date (Jan. 1, 2001). The last and the first
week in a year may span dates belonging to two years. That's just the way it
is.
Are you suggesting strptime('2002 01 1', '%Y %V %u') to mean "first day of
first week of 2002, except if that would change the year, in which case it
means ???"
If you want to strftime(strptime(date, fmt), fmt) and arrive at the original
date then yes, you need %G (but only in strftime).
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12006>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com