From 1185c6172b4dd5482b7bc76b12d7a0588320e027 Mon Sep 17 00:00:00 2001 From: Baptiste Mispelon Date: Fri, 15 Nov 2019 17:28:48 +0100 Subject: [PATCH] Fixed #30990 -- Fixed example output in 'z' date format docs. --- django/utils/dateformat.py | 2 +- 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.