MCPcopy
hub / github.com/django/django / _get_next_year

Method _get_next_year

django/views/generic/dates.py:55–64  ·  view source on GitHub ↗

Return the start date of the next interval. The interval is defined by start date <= item date < next start date.

(self, date)

Source from the content-addressed store, hash-verified

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."""

Callers 1

get_dated_itemsMethod · 0.80

Calls 1

Http404Class · 0.90

Tested by

no test coverage detected