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.

Added in version 1.0.

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.

Added in version 3.0.5.

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.

Added in version 3.0.5.

contains(container: TimeSpan) int#

Checks whether one TimeSpan is contained in another TimeSpan.

Added in version 1.0.

Parameters:

container – The target container of TimeSpan

get_end() int#

Gets the end of TimeSpan.

Added in version 1.0.

get_is_busy() bool#

Gets the is_busy of TimeSpan.

Added in version 1.0.

get_start() int#

Gets the start of TimeSpan.

Added in version 1.0.

overlaps(s2: TimeSpan) int#

Checks whether two spans overlap.

Added in version 1.0.

Parameters:

s2 – The second TimeSpan

set_end(end: int) None#

Sets the end of TimeSpan.

Added in version 1.0.

Parameters:

end – The end

set_is_busy(is_busy: bool) None#

Sets the is_busy of TimeSpan.

Added in version 1.0.

Parameters:

is_busy – The is_busy

set_start(start: int) None#

Sets the start of TimeSpan.

Added in version 1.0.

Parameters:

start – The start