Author tr12
Recipients p-ganssle, paul.moore, steve.dower, tim.golden, tr12, zach.ware
Date 2019-01-29.12:04:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAJOYu78PbvPnW-qoJ_8S861tAkMe5vvnv_57C0diHercak1uvg@mail.gmail.com>
In-reply-to <1548693835.35.0.211782016392.issue35841@roundup.psfhosted.org>
Content
Hi Paul,

Thank you for the clarification. I can see that %V does indeed return the
correct week number. It seems that when calling strftime, it is possible to
use this in conjunction with %y, but when calling strptime, it is not. Is
this also intended behaviour?

Best regards,

Tommy

On Mon, Jan 28, 2019 at 4:44 PM Paul Ganssle <report@bugs.python.org> wrote:

>
> Paul Ganssle <p.ganssle@gmail.com> added the comment:
>
> I think this is not a bug. bpo-35535 is probably also intended behavior,
> but that is less certain.
>
> The misunderstanding here is that %W does not give you the ISO week
> number, from the documentation:
>
>     %W: Week number of the year (Monday as the first day of the week) as a
> decimal number.
>         All days in a new year preceding the first Monday are considered
> to be in week 0.
>
>
> If you want the ISO week number, I think you need %V, which *is* the ISO
> week:
>
>     >>> datetime(2018, 12, 31).strftime("%V %W")
>
>     '01 53'
>
> I believe this ticket can be closed.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue35841>
> _______________________________________
>
History
Date User Action Args
2019-01-29 12:04:20tr12setrecipients: + tr12, paul.moore, tim.golden, zach.ware, steve.dower, p-ganssle
2019-01-29 12:04:18tr12linkissue35841 messages
2019-01-29 12:04:18tr12create