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

Method as_timedelta

src/pendulum/duration.py:292–296  ·  view source on GitHub ↗

Return the interval as a native timedelta.

(self)

Source from the content-addressed store, hash-verified

290 return 1
291
292 def as_timedelta(self) -> timedelta:
293 """
294 Return the interval as a native timedelta.
295 """
296 return timedelta(seconds=self.total_seconds())
297
298 def __str__(self) -> str:
299 return self.in_words()

Callers 3

_cmpMethod · 0.80
test_as_timedeltaFunction · 0.80
test_timedelta_behaviorFunction · 0.80

Calls 1

total_secondsMethod · 0.95

Tested by 2

test_as_timedeltaFunction · 0.64
test_timedelta_behaviorFunction · 0.64