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

Method replace

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

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

(self, year=None, month=None, day=None)

Source from the content-addressed store, hash-verified

1086 return _ymd2ord(self._year, self._month, self._day)
1087
1088 def replace(self, year=None, month=None, day=None):
1089 """Return a new date with new values for the specified fields."""
1090 if year is None:
1091 year = self._year
1092 if month is None:
1093 month = self._month
1094 if day is None:
1095 day = self._day
1096 return type(self)(year, month, day)
1097
1098 # Comparisons of date objects with other.
1099

Callers 3

_wrap_strftimeFunction · 0.45
astimezoneMethod · 0.45
_cmpMethod · 0.45

Calls 1

typeClass · 0.50

Tested by

no test coverage detected