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.TimeorNone) – anICalGLib.Time, the end of the period
- Returns:
a newly allocated
ECal.ComponentPeriod- Return type:
Creates a new
ECal.ComponentPeriodof kindECal.ComponentPeriodKind.DATETIME. The returned structure should be freed with e_cal_component_period_free(), when no longer needed.Added 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.ComponentPeriodof kindECal.ComponentPeriodKind.DURATION. The returned structure should be freed with e_cal_component_period_free(), when no longer needed.Added 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:
Added 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.Durationobject is owned by self and should not be freed. It’s valid until the self is freed or its duration changed.Added 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.Timeobject is owned by self and should not be freed. It’s valid until the self is freed or its end time changed.Added 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().Added 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.Timeobject is owned by self and should not be freed. It’s valid until the self is freed or its start time changed.Added in version 3.34.
- set_datetime_full(start, end)¶
- Parameters:
start (
ICalGLib.Time) – anICalGLib.Time, the start of the selfend (
ICalGLib.TimeorNone) – anICalGLib.Time, the end of the self
Set the kind of self to be
ECal.ComponentPeriodKind.DATETIMEand fills the content with start and end.Added 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.Added 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.DURATIONand fills the content with start and duration.Added in version 3.34.
- set_end(end)¶
- Parameters:
end (
ICalGLib.TimeorNone) – 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.Added 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.
Added in version 3.34.