MCPcopy
hub / github.com/django/django / _get_next_week

Method _get_next_week

django/views/generic/dates.py:205–214  ·  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

203 return _get_next_prev(self, date, is_previous=True, period="week")
204
205 def _get_next_week(self, date):
206 """
207 Return the start date of the next interval.
208
209 The interval is defined by start date <= item date < next start date.
210 """
211 try:
212 return date + datetime.timedelta(days=7 - self._get_weekday(date))
213 except OverflowError:
214 raise Http404(_("Date out of range"))
215
216 def _get_current_week(self, date):
217 """Return the start date of the current interval."""

Callers 1

get_dated_itemsMethod · 0.80

Calls 2

_get_weekdayMethod · 0.95
Http404Class · 0.90

Tested by

no test coverage detected