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'.''
--
Ticket URL: <https://code.djangoproject.com/ticket/31620>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* version: 3.0 => master
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:1>
* owner: nobody => Omkar Kulkarni
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:2>
* owner: Omkar Kulkarni => Hasan Ramezani
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:3>
* needs_better_patch: 0 => 1
Comment:
Replying to [comment:3 Hasan Ramezani]:
Unfortunately the implementation is wrong. ISO weeks start on Monday.
https://en.wikipedia.org/wiki/ISO_week_date
--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:4>
* needs_better_patch: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"8984cab8a80af8555b1ccfa5b552d411b47f9bca" 8984cab]:
{{{
#!CommitTicketReference repository=""
revision="8984cab8a80af8555b1ccfa5b552d411b47f9bca"
Fixed #31620 -- Added support for %V format to WeekMixin/WeekArchiveView.
Co-authored-by: Mariusz Felisiak <felisiak...@gmail.com>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/31620#comment:7>