## e-cal-component-datetime

e-cal-component-datetime — An ECalComponentDateTime structure

## Functions

ECalComponentDateTime * | e_cal_component_datetime_new ()
ECalComponentDateTime * | e_cal_component_datetime_new_take ()
ECalComponentDateTime * | e_cal_component_datetime_copy ()
void | e_cal_component_datetime_free ()
void | e_cal_component_datetime_set ()
ICalTime * | e_cal_component_datetime_get_value ()
void | e_cal_component_datetime_set_value ()
void | e_cal_component_datetime_take_value ()
const gchar * | e_cal_component_datetime_get_tzid ()
void | e_cal_component_datetime_set_tzid ()
void | e_cal_component_datetime_take_tzid ()

## Types and Values

| ECalComponentDateTime

## Object Hierarchy

        GBoxed
        ╰── ECalComponentDateTime

## Includes

    #include <libecal/libecal.h>

## Description

Contains functions to work with the ECalComponentDateTime structure.

## Functions

### e_cal_component_datetime_new ()

    ECalComponentDateTime *
    e_cal_component_datetime_new (const ICalTime *value,
                                  const gchar *tzid);

Creates a new ECalComponentDateTime instance, which holds the `value` and `tzid` . The returned structure should be freed with `e_cal_component_datetime_free()`, when no longer needed.

#### Parameters

value | an ICalTime as a value. | [not nullable]
tzid | timezone ID for the `value` , or `NULL`. | [nullable]

#### Returns

a new ECalComponentDateTime.

[transfer full]

Since: 3.34

### e_cal_component_datetime_new_take ()

    ECalComponentDateTime *
    e_cal_component_datetime_new_take (ICalTime *value,
                                       gchar *tzid);

Creates a new ECalComponentDateTime instance, which holds the `value` and `tzid` . It is similar to `e_cal_component_datetime_new()`, except this function assumes ownership of the `value` and `tzid` . The returned structure should be freed with `e_cal_component_datetime_free()`, when no longer needed.

#### Parameters

value | an ICalTime as a value. | [transfer full][not nullable]
tzid | timezone ID for the `value` , or `NULL`. | [transfer full][nullable]

#### Returns

a new ECalComponentDateTime.

[transfer full]

Since: 3.34

### e_cal_component_datetime_copy ()

    ECalComponentDateTime *
    e_cal_component_datetime_copy (const ECalComponentDateTime *dt);

Creates a new copy of `dt` . The returned structure should be freed with `e_cal_component_datetime_free()` when no longer needed.

#### Parameters

dt | an ECalComponentDateTime. | [not nullable]

#### Returns

a new ECalComponentDateTime, copy of `dt` .

[transfer full]

Since: 3.34

### e_cal_component_datetime_free ()

    void
    e_cal_component_datetime_free (gpointer dt);

Free `dt` , previously created by `e_cal_component_datetime_new()`, `e_cal_component_datetime_new_take()` or `e_cal_component_datetime_copy()`. The function does nothing, if `dt` is `NULL`.

[skip]

#### Parameters

dt | an ECalComponentDateTime to free. | [type ECalComponentDateTime][nullable]

Since: 3.34

### e_cal_component_datetime_set ()

    void
    e_cal_component_datetime_set (ECalComponentDateTime *dt,
                                  const ICalTime *value,
                                  const gchar *tzid);

Sets both `value` and `tzid` in one call. Use `e_cal_component_datetime_set_value()` and `e_cal_component_datetime_set_tzid()` to set them separately.

#### Parameters

dt | an ECalComponentDateTime |
value | an ICalTime as a value. | [not nullable]
tzid | timezone ID for the `value` , or `NULL`. | [nullable]

Since: 3.34

### e_cal_component_datetime_get_value ()

    ICalTime *
    e_cal_component_datetime_get_value (const ECalComponentDateTime *dt);

Returns the value stored with the `dt` . The object is owned by `dt` and it's valid until the `dt` is freed or its value overwritten.

#### Parameters

dt | an ECalComponentDateTime |

#### Returns

a value of `dt` , as an ICalTime.

[transfer none]

Since: 3.34

### e_cal_component_datetime_set_value ()

    void
    e_cal_component_datetime_set_value (ECalComponentDateTime *dt,
                                        const ICalTime *value);

Sets the `value` of the `dt` . Any previously set value is freed.

#### Parameters

dt | an ECalComponentDateTime |
value | the value to set, as an ICalTime. | [not nullable]

Since: 3.34

### e_cal_component_datetime_take_value ()

    void
    e_cal_component_datetime_take_value (ECalComponentDateTime *dt,
                                         ICalTime *value);

Sets the `value` of the `dt` and assumes ownership of the `value` . Any previously set value is freed.

#### Parameters

dt | an ECalComponentDateTime |
value | the value to take, as an ICalTime. | [not nullable][transfer full]

Since: 3.34

### e_cal_component_datetime_get_tzid ()

    const gchar *
    e_cal_component_datetime_get_tzid (const ECalComponentDateTime *dt);

Returns the TZID stored with the `dt` . The string is owned by `dt` and it's valid until the `dt` is freed or its TZID overwritten. It never returns an empty string, it returns either set TZID parameter value or `NULL`, when none is set.

#### Parameters

dt | an ECalComponentDateTime |

#### Returns

a TZID of `dt` , or `NULL`.

[transfer none][nullable]

Since: 3.34

### e_cal_component_datetime_set_tzid ()

    void
    e_cal_component_datetime_set_tzid (ECalComponentDateTime *dt,
                                       const gchar *tzid);

Sets the `tzid` of the `dt` . Any previously set TZID is freed. An empty string or a `NULL` as `tzid` is treated as none TZID.

#### Parameters

dt | an ECalComponentDateTime |
tzid | the TZID to set, or `NULL`. | [nullable]

Since: 3.34

### e_cal_component_datetime_take_tzid ()

    void
    e_cal_component_datetime_take_tzid (ECalComponentDateTime *dt,
                                        gchar *tzid);

Sets the `tzid` of the `dt` and assumes ownership of `tzid` . Any previously set TZID is freed. An empty string or a `NULL` as `tzid` is treated as none TZID.

#### Parameters

dt | an ECalComponentDateTime |
tzid | the TZID to take, or `NULL`. | [nullable][transfer full]

Since: 3.34

## Types and Values

### ECalComponentDateTime

    typedef struct _ECalComponentDateTime ECalComponentDateTime;

An opaque structure containing an ICalTime describing the date/time value and also its TZID parameter. Use the functions below to work with it.