Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#992 closed defect (fixed)

[patch] archive_month generic view leaves out last day of month

Reported by: ubernostrum Owned by: jacob
Component: Generic views Version: master
Severity: major Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Items published on the last day of a month won't be listed by the archive_month generic view (for example, at the moment the latest entry in the Django weblog is dated Nov. 30, and doesn't show up in the November archive of the Django blog); the view calculates the first and last day of the month, and uses those in a range lookup, but apparently this isn't inclusive (which is contrary to what the DB API docs claim). The view needs to use the first day of the next month as its last day instead.

Attachments (3)

date_based.diff (829 bytes) - added by ubernostrum 10 years ago.
Patch to use first day of next month instead of last day of month
date_based.2.diff (933 bytes) - added by ubernostrum 10 years ago.
New patch that doesn't hate the month of November
date_based.3.diff (941 bytes) - added by ubernostrum 10 years ago.
It works this time. Testing is our friend.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by ubernostrum

Patch to use first day of next month instead of last day of month

Changed 10 years ago by ubernostrum

New patch that doesn't hate the month of November

comment:1 Changed 10 years ago by ubernostrum

Actually... that's two boneheaded blunders in as many attempts. I'm going to grab a few hours of sleep, and then do this right.

Changed 10 years ago by ubernostrum

It works this time. Testing is our friend.

comment:2 Changed 10 years ago by Esaj <jason at jasondavies.com>

  • Summary changed from archive_month generic view leaves out last day of month to [patch] archive_month generic view leaves out last day of month

comment:3 Changed 10 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [1571]) Fixed #992 -- Fixed bug in archive_month generic view leaving out the last day of the month. Thanks, ubernostrum

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