[docs] [issue13305] datetime.strftime("%Y") not consistent for years < 1000

Martin Panter report at bugs.python.org
Sat Jan 2 17:55:38 EST 2016

Martin Panter added the comment:

At the bottom of <https://docs.python.org/dev/library/time.html#time.strftime> it suggests that this four-digit field width specifier is not portable. Does that also hold for the datetime version? It seems like a bad idea to recommend an unportable workaround for a portability problem.

Also, in the patch it is not clear if you are referring to strptime(), strftime(), or both. On Linux, datetime.strptime(..., "%4Y") fails for me.

nosy: +martin.panter

Python tracker <report at bugs.python.org>

More information about the docs mailing list