ECal.ComponentPeriod

Fields

None

Methods

class

new_datetime (start, end)

class

new_duration (start, duration)

copy ()

get_duration ()

get_end ()

get_kind ()

get_start ()

set_datetime_full (start, end)

set_duration (duration)

set_duration_full (start, duration)

set_end (end)

set_start (start)

Details

class ECal.ComponentPeriod

Period of time, can have explicit start/end times or start/duration instead. Use the functions below to work with it.

classmethod new_datetime(start, end)
Parameters:
Returns:

a newly allocated ECal.ComponentPeriod

Return type:

ECal.ComponentPeriod

Creates a new ECal.ComponentPeriod of kind ECal.ComponentPeriodKind.DATETIME. The returned structure should be freed with e_cal_component_period_free(), when no longer needed.

New in version 3.34.

classmethod new_duration(start, duration)
Parameters:
Returns:

a newly allocated ECal.ComponentPeriod

Return type:

ECal.ComponentPeriod

Creates a new ECal.ComponentPeriod of kind ECal.ComponentPeriodKind.DURATION. The returned structure should be freed with e_cal_component_period_free(), when no longer needed.

New in version 3.34.

copy()
Returns:

a newly allocated ECal.ComponentPeriod, copy of self. The returned structure should be freed with e_cal_component_period_free(), when no longer needed.

Return type:

ECal.ComponentPeriod

New in version 3.34.

get_duration()
Returns:

the duration of the period, as an ICalGLib.Duration

Return type:

ICalGLib.Duration

Returns the duration of the self. This can be called only on self objects of kind ECal.ComponentPeriodKind.DURATION. The returned ICalGLib.Duration object is owned by self and should not be freed. It’s valid until the self is freed or its duration changed.

New in version 3.34.

get_end()
Returns:

the end of the period, as an ICalGLib.Time

Return type:

ICalGLib.Time or None

Returns the end of the self. This can be called only on self objects of kind ECal.ComponentPeriodKind.DATETIME. The end time can be a null-time, in which case the self corresponds to a single date/date-time value, not to a period.

The returned ICalGLib.Time object is owned by self and should not be freed. It’s valid until the self is freed or its end time changed.

New in version 3.34.

get_kind()
Returns:

kind of the period, one of ECal.ComponentPeriodKind

Return type:

ECal.ComponentPeriodKind

Returns kind of the self, one of ECal.ComponentPeriodKind. Depending on it either ECal.ComponentPeriod.get_end()/ECal.ComponentPeriod.set_end() or ECal.ComponentPeriod.get_duration()/ECal.ComponentPeriod.set_duration() can be used. The kind of an existing self canbe changed with ECal.ComponentPeriod.set_datetime_full() and ECal.ComponentPeriod.set_duration_full().

New in version 3.34.

get_start()
Returns:

the start of the self, as an ICalGLib.Time

Return type:

ICalGLib.Time

Returns the start of the self. The returned ICalGLib.Time object is owned by self and should not be freed. It’s valid until the self is freed or its start time changed.

New in version 3.34.

set_datetime_full(start, end)
Parameters:

Set the kind of self to be ECal.ComponentPeriodKind.DATETIME and fills the content with start and end.

New in version 3.34.

set_duration(duration)
Parameters:

duration (ICalGLib.Duration) – an ICalGLib.Duration, the duration of the self

Set the duration of the self. This can be called only on self objects of kind ECal.ComponentPeriodKind.DURATION.

New in version 3.34.

set_duration_full(start, duration)
Parameters:

Set the kind of self to be ECal.ComponentPeriodKind.DURATION and fills the content with start and duration.

New in version 3.34.

set_end(end)
Parameters:

end (ICalGLib.Time or None) – an ICalGLib.Time, the end of the self

Set the end of the self. This can be called only on self objects of kind ECal.ComponentPeriodKind.DATETIME.

New in version 3.34.

set_start(start)
Parameters:

start (ICalGLib.Time) – an ICalGLib.Time, the start of the self

Set the start of the self. This can be called on any kind of the self.

New in version 3.34.