File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2651,15 +2651,15 @@ Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's
26512651``time.strftime(fmt, d.timetuple()) `` although not all objects support a
26522652:meth: `~date.timetuple ` method.
26532653
2654- For the :meth: `.datetime.strptime ` class method, the default value is
2655- ``1900-01-01T00:00:00.000 ``: any components not specified in the format string
2656- will be pulled from the default value.
2654+ For the :meth: `.datetime.strptime ` and :meth: ` .date.strptime ` class methods,
2655+ the default value is ``1900-01-01T00:00:00.000 ``: any components not specified
2656+ in the format string will be pulled from the default value.
26572657
26582658.. note ::
2659- When used to parse partial dates lacking a year, :meth: `~ .datetime.strptime `
2660- will raise when encountering February 29 because its default year of 1900 is
2661- *not * a leap year. Always add a default leap year to partial date strings
2662- before parsing.
2659+ When used to parse partial dates lacking a year, :meth: `.datetime.strptime `
2660+ and :meth: ` .date.strptime ` will raise when encountering February 29 because
2661+ the default year of 1900 is *not * a leap year. Always add a default leap
2662+ year to partial date strings before parsing.
26632663
26642664
26652665.. testsetup ::
You can’t perform that action at this time.
0 commit comments