Support "%V" format in WeekArchiveView.
#26217 (Docs for WeekArchiveView are misleading about %W) - closed 4 years ago mentioned support for %V week format.
Since python 3.6, %G, %u and %V ISO 8601 formatters were added to strptime
.
WeekArchiveView
should add %V to the list of accepted week formatters. This would require as well the special case to change the year format to %G, or simply ValueError
in _date_from_string
should mention the message passed from datetime.datetime.strptime
:
ISO week directive '%V' is incompatible with the year directive '%Y'. Use the ISO year '%G'.
Change History
(7)
Summary: |
WeekArchiveView '%V' support → Support "%V" format in WeekArchiveView.
|
Triage Stage: |
Unreviewed → Accepted
|
Version: |
3.0 → master
|
Owner: |
changed from nobody to Omkar Kulkarni
|
Status: |
new → assigned
|
Has patch: |
set
|
Owner: |
changed from Omkar Kulkarni to Hasan Ramezani
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Replying to Hasan Ramezani:
Unfortunately the implementation is wrong. ISO weeks start on Monday.
https://en.wikipedia.org/wiki/ISO_week_date