MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / replace

Method replace

tools/python-3.11.9-amd64/Lib/datetime.py:1607–1622  ·  view source on GitHub ↗

Return a new time with new values for the specified fields.

(self, hour=None, minute=None, second=None, microsecond=None,
                tzinfo=True, *, fold=None)

Source from the content-addressed store, hash-verified

1605 return offset
1606
1607 def replace(self, hour=None, minute=None, second=None, microsecond=None,
1608 tzinfo=True, *, fold=None):
1609 """Return a new time with new values for the specified fields."""
1610 if hour is None:
1611 hour = self.hour
1612 if minute is None:
1613 minute = self.minute
1614 if second is None:
1615 second = self.second
1616 if microsecond is None:
1617 microsecond = self.microsecond
1618 if tzinfo is True:
1619 tzinfo = self.tzinfo
1620 if fold is None:
1621 fold = self._fold
1622 return type(self)(hour, minute, second, microsecond, tzinfo, fold=fold)
1623
1624 # Pickle support.
1625

Callers 1

__hash__Method · 0.95

Calls 1

typeClass · 0.50

Tested by

no test coverage detected