Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 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 8 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 8 years ago.
New patch that doesn't hate the month of November
date_based.3.diff (941 bytes) - added by ubernostrum 8 years ago.
It works this time. Testing is our friend.

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by ubernostrum

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

Changed 8 years ago by ubernostrum

New patch that doesn't hate the month of November

comment:1 Changed 8 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 8 years ago by ubernostrum

It works this time. Testing is our friend.

comment:2 Changed 8 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 8 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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.