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

Function duration

src/pendulum/__init__.py:302–326  ·  view source on GitHub ↗

Create a Duration instance.

(
    days: float = 0,
    seconds: float = 0,
    microseconds: float = 0,
    milliseconds: float = 0,
    minutes: float = 0,
    hours: float = 0,
    weeks: float = 0,
    years: float = 0,
    months: float = 0,
)

Source from the content-addressed store, hash-verified

300
301
302def duration(
303 days: float = 0,
304 seconds: float = 0,
305 microseconds: float = 0,
306 milliseconds: float = 0,
307 minutes: float = 0,
308 hours: float = 0,
309 weeks: float = 0,
310 years: float = 0,
311 months: float = 0,
312) -> Duration:
313 """
314 Create a Duration instance.
315 """
316 return Duration(
317 days=days,
318 seconds=seconds,
319 microseconds=microseconds,
320 milliseconds=milliseconds,
321 minutes=minutes,
322 hours=hours,
323 weeks=weeks,
324 years=years,
325 months=months,
326 )
327
328
329def interval(

Callers

nothing calls this directly

Calls 1

DurationClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…