New submission from Jaap van der Velde <jaapvanderve...@gmail.com>:
When running: ``` datetime.strptime('2013 23', '%Y %W') ``` The result is `datetime.datetime(2013, 1, 1, 0, 0)`. When running: ``` datetime.strptime('2013 23 1', '%Y %W %w') ``` The result is `datetime.datetime(2013, 6, 10, 0, 0)`. It seems that `%W` is ignored, unless `%w` is also provided. But instead of throwing an error, a result is returned that is needlessly inaccurate. It could (and should?) return the first day of the week as a default, if an error is undesirable. Similar to: ``` datetime.strptime('2013 3', '%Y %m') ``` ---------- components: Library (Lib) messages: 394611 nosy: Jaap van der Velde priority: normal severity: normal status: open title: strptime and week numbers without week days type: enhancement versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44255> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com