diff --git a/Lib/_pydatetime.py b/Lib/_pydatetime.py index 50e21a12335611..4b03ad313ddc25 100644 --- a/Lib/_pydatetime.py +++ b/Lib/_pydatetime.py @@ -1107,6 +1107,8 @@ def strftime(self, format): Format using strftime(). Example: "%d/%m/%Y, %H:%M:%S" + + `A list of supported format codes can be viewed here. `_ """ return _wrap_strftime(self, format, self.timetuple()) @@ -1636,6 +1638,8 @@ def fromisoformat(cls, time_string): def strftime(self, format): """Format using strftime(). The date part of the timestamp passed to underlying strftime should not be used. + + `A list of supported format codes can be viewed here. `_ """ # The year must be >= 1000 else Python's strftime implementation # can raise a bogus exception. @@ -2180,7 +2184,9 @@ def __str__(self): @classmethod def strptime(cls, date_string, format): - 'string, format -> new datetime parsed from a string (like time.strptime()).' + """string, format -> new datetime parsed from a string (like time.strptime()). + + `A list of supported format codes can be viewed here. `_""" import _strptime return _strptime._strptime_datetime_datetime(cls, date_string, format)