MCPcopy Index your code
hub / github.com/python-pendulum/pendulum / replace

Method replace

src/pendulum/date.py:747–757  ·  view source on GitHub ↗
(
        self,
        year: SupportsIndex | None = None,
        month: SupportsIndex | None = None,
        day: SupportsIndex | None = None,
    )

Source from the content-addressed store, hash-verified

745 return cls(dt.year, dt.month, dt.day)
746
747 def replace(
748 self,
749 year: SupportsIndex | None = None,
750 month: SupportsIndex | None = None,
751 day: SupportsIndex | None = None,
752 ) -> Self:
753 year = year if year is not None else self.year
754 month = month if month is not None else self.month
755 day = day if day is not None else self.day
756
757 return self.__class__(year, month, day)

Callers 2

setMethod · 0.95
_nth_of_quarterMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected