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

Method replace

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

1156 return _ymd2ord(self._year, self._month, self._day)
1157
1158 def replace(self, year=None, month=None, day=None):
1159 """Return a new date with new values for the specified fields."""
1160 if year is None:
1161 year = self._year
1162 if month is None:
1163 month = self._month
1164 if day is None:
1165 day = self._day
1166 return type(self)(year, month, day)
1167
1168 __replace__ = replace
1169

Callers 3

_wrap_strftimeFunction · 0.45
astimezoneMethod · 0.45
_cmpMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected