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 serge-bon
Recipients matheus.v.portela, mrabarnett, musically_ut, serge-bon, winton, xtreak
Date 2018-12-24.02:30:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1545618610.47.0.0770528567349.issue30802@roundup.psfhosted.org>
In-reply-to
Content
Documentation says:

%U - Week number of the year (Sunday as the first day of the week)
%W - Week number of the year (Monday as the first day of the week)

It wouldn't be intuitive if %U assumed Sunday when weekday provided and Monday otherwise. There are two separate directives specifically to distinguish these two cases, so which day of the week is the first one should be determined on the used directive:

>>> datetime.strptime ('2018 Mon 52', '%Y %a %W')
datetime.datetime(2018, 12, 24, 0, 0)

>>> datetime.strptime ('2018 52',     '%Y %W')
datetime.datetime(2018, 12, 24, 0, 0)

>>> datetime.strptime ('2018 Sun 52', '%Y %a %U')
datetime.datetime(2018, 12, 30, 0, 0)

>>> datetime.strptime ('2018 52',     '%Y %U')
datetime.datetime(2018, 12, 30, 0, 0)
History
Date User Action Args
2018-12-24 02:30:12serge-bonsetrecipients: + serge-bon, mrabarnett, musically_ut, matheus.v.portela, winton, xtreak
2018-12-24 02:30:10serge-bonsetmessageid: <1545618610.47.0.0770528567349.issue30802@roundup.psfhosted.org>
2018-12-24 02:30:10serge-bonlinkissue30802 messages
2018-12-24 02:30:10serge-boncreate