resqpy.time_series.TimeDuration

class resqpy.time_series.TimeDuration(days=None, hours=None, minutes=None, seconds=None, earlier_timestamp=None, later_timestamp=None)

Bases: object

A thin wrapper around python’s datetime timedelta objects (not a RESQML class).

Methods:

__init__([days, hours, minutes, seconds, ...])

Create a TimeDuration object either from days and seconds or from a pair of timestamps.

timestamp_after_duration(earlier_timestamp)

Create a new timestamp from this duration and an earlier timestamp.

timestamp_before_duration(later_timestamp)

Create a new timestamp from this duration and a later timestamp.


__init__(days=None, hours=None, minutes=None, seconds=None, earlier_timestamp=None, later_timestamp=None)[source]

Create a TimeDuration object either from days and seconds or from a pair of timestamps.

timestamp_after_duration(earlier_timestamp)[source]

Create a new timestamp from this duration and an earlier timestamp.

timestamp_before_duration(later_timestamp)[source]

Create a new timestamp from this duration and a later timestamp.