Return the start date of the next interval. The interval is defined by start date <= item date < next start date.
(self, date)
| 53 | return _get_next_prev(self, date, is_previous=True, period="year") |
| 54 | |
| 55 | def _get_next_year(self, date): |
| 56 | """ |
| 57 | Return the start date of the next interval. |
| 58 | |
| 59 | The interval is defined by start date <= item date < next start date. |
| 60 | """ |
| 61 | try: |
| 62 | return date.replace(year=date.year + 1, month=1, day=1) |
| 63 | except ValueError: |
| 64 | raise Http404(_("Date out of range")) |
| 65 | |
| 66 | def _get_current_year(self, date): |
| 67 | """Return the start date of the current interval.""" |