Browse Source

Fixed #30990 -- Fixed example output in 'z' date format docs.

Baptiste Mispelon 5 years ago
parent
commit
1185c6172b
2 changed files with 2 additions and 2 deletions
  1. 1 1
      django/utils/dateformat.py
  2. 1 1
      docs/ref/templates/builtins.txt

+ 1 - 1
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

+ 1 - 1
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.