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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| update(self,
start_time,
end_time,
start_delta=None,
end_delta=None) |
source code
|
|
|
|
inside(self,
time)
Return True if the given time is inside this period or on the border,
otherwise False. |
source code
|
|
|
|
overlap(self,
time_period)
Return True if this time period has any overlap with the given. |
source code
|
|
|
|
is_period(self)
Return True if this time period is longer than just a point in time,
otherwise False. |
source code
|
|
|
|
mean_time(self)
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. |
source code
|
|
|
|
|
|
|
move(self,
direction)
Move this time period one 10th to the given direction. |
source code
|
|
|
|
|
|
|
delta(self)
Return the length of this time period as a timedelta object. |
source code
|
|
|
|
|
|
|
get_label(self)
Returns a unicode string describing the time period. |
source code
|
|
|
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|