ZeitgeistTimeRange 3 ZEITGEIST-2.0 Library
ZeitgeistTimeRange Immutable representation of an interval in time, marked by a beginning and an end

## Functions

GVariant * | zeitgeist_time_range_to_variant ()
ZeitgeistTimeRange * | zeitgeist_time_range_intersect ()
ZeitgeistTimeRange * | zeitgeist_time_range_new ()
ZeitgeistTimeRange * | zeitgeist_time_range_new_anytime ()
ZeitgeistTimeRange * | zeitgeist_time_range_new_to_now ()
ZeitgeistTimeRange * | zeitgeist_time_range_new_from_now ()
ZeitgeistTimeRange * | zeitgeist_time_range_new_from_variant ()
gint64 | zeitgeist_time_range_get_start ()
gint64 | zeitgeist_time_range_get_end ()

## Properties

gint64 | end | Read
gint64 | start | Read

## Types and Values

#define | ZEITGEIST_TYPE_TIME_RANGE
struct | ZeitgeistTimeRange
struct | ZeitgeistTimeRangeClass

## Object Hierarchy

        GObject
        ╰── ZeitgeistTimeRange

## Description

A light, immutable, encapsulation of an interval in time, marked by a beginning and an end.

## Functions

### zeitgeist_time_range_to_variant ()

    GVariant *
    zeitgeist_time_range_to_variant (ZeitgeistTimeRange *self);

a new variant holding the time range

#### Parameters

self | the ZeitgeistTimeRange instance |

zeitgeist_time_range_to_variant

### zeitgeist_time_range_intersect ()

    ZeitgeistTimeRange *
    zeitgeist_time_range_intersect (ZeitgeistTimeRange *self,
                                    ZeitgeistTimeRange *time_range);

Check whether two time ranges are intersecting.

#### Parameters

self | the ZeitgeistTimeRange instance |
time_range | . the second time range to compare with . | [in]

#### Returns

a new time range representing the intersection

zeitgeist_time_range_intersect

### zeitgeist_time_range_new ()

    ZeitgeistTimeRange *
    zeitgeist_time_range_new (gint64 start_msec,
                              gint64 end_msec);

starting timestamp in number of milliseconds since the Unix Epoch

#### Parameters

start_msec | . | [in]
end_msec | . ending timestamp in number of milliseconds since the Unix Epoch . | [in]

#### Returns

a newly allocated ZeitgeistTimeRange. Free with `g_object_unref()`

zeitgeist_time_range_new

### zeitgeist_time_range_new_anytime ()

    ZeitgeistTimeRange *
    zeitgeist_time_range_new_anytime (void);

a new time range starting from the beginning of the Unix Epoch stretching to the end of time

zeitgeist_time_range_new_anytime

### zeitgeist_time_range_new_to_now ()

    ZeitgeistTimeRange *
    zeitgeist_time_range_new_to_now (void);

a new time range starting from the beggining of the Unix Epoch ending a the moment of invocation

zeitgeist_time_range_new_to_now

### zeitgeist_time_range_new_from_now ()

    ZeitgeistTimeRange *
    zeitgeist_time_range_new_from_now (void);

a new time range starting from the moment of invocation to the end of time

zeitgeist_time_range_new_from_now

### zeitgeist_time_range_new_from_variant ()

    ZeitgeistTimeRange *
    zeitgeist_time_range_new_from_variant (GVariant *variant,
                                           GError **error);

Create a TimeRange from a variant.

#### Parameters

variant | . a variant representing a TimeRange . | [in]
error | location to store the error occurring, or `NULL` to ignore. | [error-domains ZeitgeistDataModelError]

#### Returns

a new time range starting from the moment of invocation to the end of time

zeitgeist_time_range_new_from_variant

### zeitgeist_time_range_get_start ()

    gint64
    zeitgeist_time_range_get_start (ZeitgeistTimeRange *self);

Get and return the current value of the "start" property.

#### Parameters

self | the ZeitgeistTimeRange instance to query |

#### Returns

the value of the "start" property

zeitgeist_time_range_get_start

### zeitgeist_time_range_get_end ()

    gint64
    zeitgeist_time_range_get_end (ZeitgeistTimeRange *self);

Get and return the current value of the "end" property.

#### Parameters

self | the ZeitgeistTimeRange instance to query |

#### Returns

the value of the "end" property

zeitgeist_time_range_get_end

## Types and Values

### ZEITGEIST_TYPE_TIME_RANGE

    #define ZEITGEIST_TYPE_TIME_RANGE (zeitgeist_time_range_get_type ())

The type for ZeitgeistTimeRange.

ZEITGEIST_TYPE_TIME_RANGE

### struct ZeitgeistTimeRange

    struct ZeitgeistTimeRange;

Immutable representation of an interval in time, marked by a beginning and an end

A light, immutable, encapsulation of an interval in time, marked by a beginning and an end.

ZeitgeistTimeRange

### struct ZeitgeistTimeRangeClass

    struct ZeitgeistTimeRangeClass {
    	GObjectClass parent_class;
    };

The class structure for `ZEITGEIST_TYPE_TIME_RANGE`. All the fields in this structure are private and should never be accessed directly.

#### Members

ZeitgeistTimeRangeClass

## Property Details

### The `“end”` property

      “end”                      gint64

end.

Owner: ZeitgeistTimeRange

Flags: Read

Default value: 0

ZeitgeistTimeRange:end

### The `“start”` property

      “start”                    gint64

start.

Owner: ZeitgeistTimeRange

Flags: Read

Default value: 0

ZeitgeistTimeRange:start