[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-06-29 Thread winton Wang

New submission from winton Wang:

datetime stiptime error according to "%U" format.

Python version: 3.4.3, 2.7.13 ,3.6.0, 3.5.2


from datetime import datetime

input:
  datetime.strptime('201726', '%Y%U')

output:
  datetime.datetime(2007, 1, 1, 0, 0)

--
components: Library (Lib)
messages: 297265
nosy: winton
priority: normal
severity: normal
status: open
title: datetime.datetime.strptime('200722', '%Y%U')
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 
<http://bugs.python.org/issue30802>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30802] datetime.datetime.strptime('200722', '%Y%U')

2017-06-29 Thread winton Wang

winton Wang added the comment:

the output:
   datetime.datetime(2017, 1, 1, 0, 0)

I question about the week format if without the week of the weekday, the 
datetime should be the fist day of week as the default?

--

___
Python tracker 
<http://bugs.python.org/issue30802>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com