diff --git a/Doc/library/datetime.rst b/Doc/library/datetime.rst index a822842..6ddf554 100644 --- a/Doc/library/datetime.rst +++ b/Doc/library/datetime.rst @@ -1955,6 +1955,11 @@ Notes: The :meth:`strptime` method can parse years in the full [1, 9999] range, but years < 1000 must be zero-filled to 4-digit width. + The :meth:`strftime` method will zero pad automatically for years < 1000 on + some platforms (e.g. Mac OS X, Windows), but not on others (e.g. Linux). Zero + padding can be forced on some platforms by using e.g. ``%4Y``, but this may + produce an invalid output or errors on other platforms. + .. versionchanged:: 3.2 In previous versions, :meth:`strftime` method was restricted to years >= 1900.