MCPcopy Create free account
hub / github.com/dateutil/dateutil / replace

Method replace

src/dateutil/rrule.py:762–774  ·  view source on GitHub ↗

Return new rrule with same attributes except for those attributes given new values by whichever keyword arguments are specified.

(self, **kwargs)

Source from the content-addressed store, hash-verified

760 return '\n'.join(output)
761
762 def replace(self, **kwargs):
763 """Return new rrule with same attributes except for those attributes given new
764 values by whichever keyword arguments are specified."""
765 new_kwargs = {"interval": self._interval,
766 "count": self._count,
767 "dtstart": self._dtstart,
768 "freq": self._freq,
769 "until": self._until,
770 "wkst": self._wkst,
771 "cache": False if self._cache is None else True }
772 new_kwargs.update(self._original_rule)
773 new_kwargs.update(kwargs)
774 return rrule(**new_kwargs)
775
776 def _iter(self):
777 year, month, day, hour, minute, second, weekday, yearday, _ = \

Callers 15

default_tzinfoFunction · 0.45
__add__Method · 0.45
__init__Method · 0.45
_parse_date_valueMethod · 0.45
testReplaceIfSetMethod · 0.45
testReplaceIfNotSetMethod · 0.45
test_utils_within_deltaFunction · 0.45
_isoparse_date_and_timeFunction · 0.45
test_ymd_hms_microFunction · 0.45
__make_time_examplesFunction · 0.45

Calls 1

rruleClass · 0.85

Tested by 15

testReplaceIfSetMethod · 0.36
testReplaceIfNotSetMethod · 0.36
test_utils_within_deltaFunction · 0.36
_isoparse_date_and_timeFunction · 0.36
test_ymd_hms_microFunction · 0.36
__make_time_examplesFunction · 0.36
testFoldLondonMethod · 0.36