#28209: Date-based generic views can fail with ValueError: year is out of range
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Adit
| Biswas
Type: Bug | Status: assigned
Component: Generic views | Version: 1.11
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Adit Biswas):
Sorry, I'm not sure if I've done enough. Waiting for some discussion
around this before I continue making changes.
basically datetime will throw value errors whenever the year crosses 9999.
Wherever a datetime is manipulated to increment the date to cross 10000
will be affected.
{{{
YearMixin._get_next_year(self, date)
MonthMixin._get_next_month(self, date)
DayMixin._get_next_day(self, date)
WeekMixin._get_next_week(self, date)
}}}
While 404 would be an appropriate response for dates crossing the Year
9999
shouldnt the dates between 01-01-9999 and 31-12-9999 be handled
appropriately
if I throw 404 for each mixin the behaviour will be slightly odd. since
''/dates/books/9999/'' will throw a 404 but ''/dates/books/9999/01'' will
not
--
Ticket URL: <https://code.djangoproject.com/ticket/28209#comment:5>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.908c9cba89c480bd5dd2efc3636a96a8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.