#10458: next_month and previous_month in views.generic.date_based.archive_month
return wrong dates
---------------------------------------+------------------------------------
 Reporter:  alasdair                   |       Owner:  nobody    
   Status:  new                        |   Milestone:            
Component:  Generic views              |     Version:  1.0       
 Keywords:  next_month previous_month  |       Stage:  Unreviewed
Has_patch:  0                          |  
---------------------------------------+------------------------------------
 next_month and previous_month return different days than the documentation
 says. This isn't a huge problem, since it is probably the month that is
 required.

 The documentation says that django.views.generic.date_based.archive_month
 should return:

 "next_month: A datetime.date object representing the first day of the next
 month ..."

 However it returns a datetime.date object representing the second day of
 the next month. This is because on lines 146 and 148, a timedelta is added
 to last_month, which is already set to the required first date.

 Similarly, the documentation says:

 "previous_month: A datetime.date object representing the first day of the
 previous month ..."

 when it actually returns the last day of the previous month.

 This is my first django bug report, apologies if I've done it in the wrong
 way.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10458>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to