diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2019-11-15 17:28:48 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-11-18 11:30:20 +0100 |
| commit | 1185c6172b4dd5482b7bc76b12d7a0588320e027 (patch) | |
| tree | 1bad23f01e6e5a652f939fb14ed0a379c9bffbbb | |
| parent | 18e10740a43d3d6f70a85af6fdf3bb90bdbd1183 (diff) | |
Fixed #30990 -- Fixed example output in 'z' date format docs.
| -rw-r--r-- | django/utils/dateformat.py | 2 | ||||
| -rw-r--r-- | docs/ref/templates/builtins.txt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/dateformat.py b/django/utils/dateformat.py index 836b40a70a..af46a81ce6 100644 --- a/django/utils/dateformat.py +++ b/django/utils/dateformat.py @@ -348,7 +348,7 @@ class DateFormat(TimeFormat): 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 diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt index 34c5a5c005..ea6ae5aeeb 100644 --- a/docs/ref/templates/builtins.txt +++ b/docs/ref/templates/builtins.txt @@ -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. |
