Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#30990 closed Bug (fixed)

Documentation error for `z` date format

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 (last modified by Baptiste Mispelon)

The documentation for the z date format 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.

Change History (8)

comment:1 by Baptiste Mispelon, 5 years ago

Description: modified (diff)

comment:2 by Claude Paroz, 5 years ago

comment:3 by Claude Paroz, 5 years ago

Triage Stage: UnreviewedAccepted

comment:4 by zhou_wuji, 5 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 18e10740:

Refs #30990 -- Added test for 'z' date format with a leap year.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: newclosed

In 1185c617:

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

comment:7 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In 1c75af9:

[3.0.x] Fixed #30990 -- Fixed example output in 'z' date format docs.

Backport of 1185c6172b4dd5482b7bc76b12d7a0588320e027 from master

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

In d5e8ad00:

[2.2.x] Fixed #30990 -- Fixed example output in 'z' date format docs.

Backport of 1185c6172b4dd5482b7bc76b12d7a0588320e027 from master

Note: See TracTickets for help on using tickets.
Back to Top