Top | ![]() |
![]() |
![]() |
![]() |
ZeitgeistTimeRangeZeitgeistTimeRange — Immutable representation of an interval in time, marked by a beginning and an end |
ZeitgeistTimeRange is a light, immutable, encapsulation of an interval in time, marked by a beginning and an end.
Time ranges are sub classes of GInitiallyUnowned which means that you may pass them directly to methods provided by the Zeitgeist library and forget about them. The callee will own the floating reference.
gint64
zeitgeist_time_range_get_end (ZeitgeistTimeRange *time_range
);
gchar *
zeitgeist_time_range_get_end_iso8601 (ZeitgeistTimeRange *time_range
);
Converts the a timestamp to a human readable format. Eg. 1970-01-01T00:00:00Z or 2010-04-09T07:24:08.082000Z. Note that the timezone of the formatted string will always be UTC disregarding locale.
A newly allocated string containing the timestamp formatted
according to ISO-8601. Free with g_free()
.
gint64
zeitgeist_time_range_get_start (ZeitgeistTimeRange *time_range
);
gchar *
zeitgeist_time_range_get_start_iso8601
(ZeitgeistTimeRange *time_range
);
Converts the a timestamp to a human readable format. Eg. 1970-01-01T00:00:00Z or 2010-04-09T07:24:08.082000Z. Note that the timezone of the formatted string will always be UTC disregarding locale.
A newly allocated string containing the timestamp formatted
according to ISO-8601. Free with g_free()
.
ZeitgeistTimeRange * zeitgeist_time_range_new (gint64 start_msec
,gint64 end_msec
);
ZeitgeistTimeRange*
zeitgeist_time_range_new_from_variant (GVariant *time_range
);
Create a ZeitgeistTimeRange from a GVariant
time_range |
A GVariant with signature
ZEITGEIST_TIME_RANGE_VARIANT_SIGNATURE. If |
GVariant *
zeitgeist_time_range_to_variant (ZeitgeistTimeRange *time_range
);
time_range |
A ZeitgeistTimeRange. If the reference is floating this method will assume ownership of it |