This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: datetime.replace method description error
Type: Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: tim.peters Nosy List: alpha264, tim.peters
Priority: normal Keywords:

Created on 2004-11-15 03:34 by alpha264, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg23125 - (view) Author: Brian Underwood (alpha264) Date: 2004-11-15 03:34
In the documentation for datetime.replace:

replace( year, month, day)
    Return a date with the same value, except for those
members given new values by whichever keyword arguments
are specified. For example, if d == date(2002, 12, 31),
then d.replace(day=26) == date(2000, 12, 26).

http://www.python.org/doc/current/lib/datetime-date.html

As I understand the method, either the 2002 should be
2000, or the 2000 should be 2002.  Regardless, they
should be the same year.

Brian
;p
msg23126 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2004-11-15 03:51
Logged In: YES 
user_id=31435

Thanks!  Repaired for 2.4, in

 Doc/lib/libdatetime.tex 1.53
History
Date User Action Args
2022-04-11 14:56:08adminsetgithub: 41171
2004-11-15 03:34:02alpha264create