Skip to content

Commit

Permalink
[2.2.x] Fixed #30990 -- Fixed example output in 'z' date format docs.
Browse files Browse the repository at this point in the history
Backport of 1185c61 from master
  • Loading branch information
bmispelon authored and felixxm committed Nov 18, 2019
1 parent 622158b commit d5e8ad0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django/utils/dateformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def Y(self):
return self.data.year

def z(self):
"Day of the year; i.e. '0' to '365'"
"""Day of the year, i.e. 1 to 366."""
doy = self.year_days[self.data.month] + self.data.day
if self.L() and self.data.month > 2:
doy += 1
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/templates/builtins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ Format character Description Example output
month, 2 characters.
``w`` Day of the week, digits without ``'0'`` (Sunday) to ``'6'`` (Saturday)
leading zeros.
``z`` Day of the year. ``0`` to ``365``
``z`` Day of the year. ``1`` to ``366``
**Week**
``W`` ISO-8601 week number of year, with ``1``, ``53``
weeks starting on Monday.
Expand Down

0 comments on commit d5e8ad0

Please sign in to comment.