MCPcopy Index your code
hub / github.com/python/cpython / replace

Method replace

Lib/_pydatetime.py:1173–1181  ·  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

1171 return _ymd2ord(self._year, self._month, self._day)
1172
1173 def replace(self, year=None, month=None, day=None):
1174 """Return a new date with new values for the specified fields."""
1175 if year is None:
1176 year = self._year
1177 if month is None:
1178 month = self._month
1179 if day is None:
1180 day = self._day
1181 return type(self)(year, month, day)
1182
1183 __replace__ = replace
1184

Callers 3

_wrap_strftimeFunction · 0.45
astimezoneMethod · 0.45
_cmpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected