MCPcopy Index your code
hub / github.com/RustPython/RustPython / strftime

Method strftime

Lib/_pydatetime.py:1629–1638  ·  view source on GitHub ↗

Format using strftime(). The date part of the timestamp passed to underlying strftime should not be used.

(self, format)

Source from the content-addressed store, hash-verified

1627 raise ValueError(f'Invalid isoformat string: {time_string!r}')
1628
1629 def strftime(self, format):
1630 """Format using strftime(). The date part of the timestamp passed
1631 to underlying strftime should not be used.
1632 """
1633 # The year must be >= 1000 else Python's strftime implementation
1634 # can raise a bogus exception.
1635 timetuple = (1900, 1, 1,
1636 self._hour, self._minute, self._second,
1637 0, 1, -1)
1638 return _wrap_strftime(self, format, timetuple)
1639
1640 def __format__(self, fmt):
1641 if not isinstance(fmt, str):

Callers 1

__format__Method · 0.95

Calls 1

_wrap_strftimeFunction · 0.85

Tested by

no test coverage detected