Opened 3 years ago

Closed 3 years ago

#31620 closed New feature (fixed)

Support "%V" format in WeekArchiveView.

Reported by: Jakub Jagielka Owned by: Hasan Ramezani
Component: Generic views Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


#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)

comment:1 in reply to:  description Changed 3 years ago by Mariusz Felisiak

Summary: WeekArchiveView '%V' supportSupport "%V" format in WeekArchiveView.
Triage Stage: UnreviewedAccepted
Version: 3.0master

comment:2 Changed 3 years ago by Omkar Kulkarni

Owner: changed from nobody to Omkar Kulkarni
Status: newassigned

comment:3 Changed 3 years ago by Hasan Ramezani

Has patch: set
Owner: changed from Omkar Kulkarni to Hasan Ramezani

comment:4 in reply to:  3 Changed 3 years ago by Jakub Jagielka

Patch needs improvement: set

Replying to Hasan Ramezani:

Unfortunately the implementation is wrong. ISO weeks start on Monday.

comment:5 Changed 3 years ago by Hasan Ramezani

Patch needs improvement: unset

comment:6 Changed 3 years ago by Mariusz Felisiak

Triage Stage: AcceptedReady for checkin

comment:7 Changed 3 years ago by Mariusz Felisiak <felisiak.mariusz@…>

Resolution: fixed
Status: assignedclosed

In 8984cab:

Fixed #31620 -- Added support for %V format to WeekMixin/WeekArchiveView.

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@…>

Note: See TracTickets for help on using tickets.
Back to Top