TimeSpan
-
class TimeSpan(**properties: Any)
Superclasses: Object, Object
This is the ICalTimeSpan instance.
Constructors
-
class TimeSpan
-
classmethod new(dtstart: Time, dtend: Time, is_busy: int) → TimeSpan
Creates a new TimeSpan.
- Parameters:
dtstart – The start of TimeSpan
dtend – The end of TimeSpan
is_busy – Whether this span is busy
-
classmethod new_timet(start: int, end: int, is_busy: bool) → TimeSpan
Creates a new TimeSpan. Free it with unref(), when no longer needed.
- Parameters:
start – Start of the time span
end – End of the time span
is_busy – Whether the time span is busy
Methods
-
class TimeSpan
-
clone() → TimeSpan
Creates a new TimeSpan, clone of src. Free it with unref(), when no longer needed.
-
contains(container: TimeSpan) → int
Checks whether one TimeSpan is contained in another TimeSpan.
- Parameters:
container – The target container of TimeSpan
-
get_end() → int
Gets the end of TimeSpan.
-
get_is_busy() → bool
Gets the is_busy of TimeSpan.
-
get_start() → int
Gets the start of TimeSpan.
-
overlaps(s2: TimeSpan) → int
Checks whether two spans overlap.
- Parameters:
s2 – The second TimeSpan
-
set_end(end: int) → None
Sets the end of TimeSpan.
- Parameters:
end – The end
-
set_is_busy(is_busy: bool) → None
Sets the is_busy of TimeSpan.
- Parameters:
is_busy – The is_busy
-
set_start(start: int) → None
Sets the start of TimeSpan.
- Parameters:
start – The start