module timelinelib.canvas.data.timeperiod¶
-
class
timelinelib.canvas.data.timeperiod.
TimePeriod
[source]¶ Bases:
object
Represents a period in time using a start and end time.
This is used both to store the time period for an event and for storing the currently displayed time period in the GUI.
-
__init__
(start_time, end_time)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
property
start_time
¶
-
property
end_time
¶
-
property
start_and_end_time
¶
-
inside
(time)[source]¶ Return True if the given time is inside this period or on the border, otherwise False.
-
is_period
()[source]¶ Return True if this time period is longer than just a point in time, otherwise False.
-
mean_time
()[source]¶ Return the time in the middle if this time period is longer than just a point in time, otherwise the point in time for this time period.
-
-
exception
timelinelib.canvas.data.timeperiod.
TimeOutOfRangeLeftError
[source]¶ Bases:
ValueError
-
exception
timelinelib.canvas.data.timeperiod.
TimeOutOfRangeRightError
[source]¶ Bases:
ValueError