ECal.ComponentPeriod¶
Fields¶
None
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
start (
ICalGLib.Time
) – anICalGLib.Time
, the start of the periodend (
ICalGLib.Time
orNone
) – anICalGLib.Time
, the end of the period
- Returns:
a newly allocated
ECal.ComponentPeriod
- Return type:
Creates a new
ECal.ComponentPeriod
of kindECal.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:
start (
ICalGLib.Time
) – anICalGLib.Time
, the start of the periodduration (
ICalGLib.Duration
) – anICalGLib.Duration
, the duration of the period
- Returns:
a newly allocated
ECal.ComponentPeriod
- Return type:
Creates a new
ECal.ComponentPeriod
of kindECal.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:
New in version 3.34.
- get_duration()¶
- Returns:
the duration of the period, as an
ICalGLib.Duration
- Return type:
Returns the duration of the self. This can be called only on self objects of kind
ECal.ComponentPeriodKind.DURATION
. The returnedICalGLib.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:
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:
Returns kind of the self, one of
ECal.ComponentPeriodKind
. Depending on it eitherECal.ComponentPeriod.get_end
()/ECal.ComponentPeriod.set_end
() orECal.ComponentPeriod.get_duration
()/ECal.ComponentPeriod.set_duration
() can be used. The kind of an existing self canbe changed withECal.ComponentPeriod.set_datetime_full
() andECal.ComponentPeriod.set_duration_full
().New in version 3.34.
- get_start()¶
- Returns:
the start of the self, as an
ICalGLib.Time
- Return type:
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:
start (
ICalGLib.Time
) – anICalGLib.Time
, the start of the selfend (
ICalGLib.Time
orNone
) – anICalGLib.Time
, the end of the self
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
) – anICalGLib.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:
start (
ICalGLib.Time
) – anICalGLib.Time
, the start of the selfduration (
ICalGLib.Duration
) – anICalGLib.Duration
, the duration of the self
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
orNone
) – anICalGLib.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
) – anICalGLib.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.