Opened 5 years ago
Last modified 5 years ago
#30990 closed Bug
Documentation error for `z` date format — at Initial Version
Reported by: | Baptiste Mispelon | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The documentation for the z
[date format](https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date) states that its output ranges from "0 to 365".
This is actually incorrect and the range is 1-366 (January 1st is 1 and December 31st is 365 or 366 depending on whether it's a leap year or not).
While digging there, I also noticed that the implementations of the z
and W
formats seemed to just reimplement code that it already in Python's standard library so I added some commits to the pull request to simplify that a bit.