| libical-glib Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
ICalTimetype * i_cal_time_null_time (void); ICalTimetype * i_cal_time_null_date (void); ICalTimetype * i_cal_time_current_time_with_zone (ICalTimezone *zone); ICalTimetype * i_cal_time_today (void); ICalTimetype * i_cal_time_from_timet_with_zone (const,time_t v,gint is_dateICalTimezone *zone); ICalTimetype * i_cal_time_from_string (const); ICalTimetype * i_cal_time_from_day_of_year (gchar *strconst,gint dayconst);gint yeartime_t i_cal_time_as_timet (ICalTimetype *tt);time_t i_cal_time_as_timet_with_zone (ICalTimetype *tt,ICalTimezone *zone);gchar * i_cal_time_as_ical_string_r (ICalTimetype *tt); const ICalTimezone * i_cal_time_get_timezone (ICalTimetype *tt); ICalTimetype * i_cal_time_set_timezone (ICalTimetype *tt,ICalTimezone *zone); constgchar * i_cal_time_get_tzid (ICalTimetype *tt);gint i_cal_time_day_of_year (ICalTimetype *tt);gint i_cal_time_day_of_week (ICalTimetype *tt);gint i_cal_time_start_doy_week (ICalTimetype *tt,);gint fdowgint i_cal_time_week_number (ICalTimetype *tt);gint i_cal_time_is_null_time (ICalTimetype *tt);gint i_cal_time_is_valid_time (ICalTimetype *tt);gint i_cal_time_is_date (ICalTimetype *tt);gint i_cal_time_is_utc (ICalTimetype *tt);gint i_cal_time_compare (ICalTimetype *a,ICalTimetype *b);gint i_cal_time_compare_date_only (ICalTimetype *a,ICalTimetype *b);gint i_cal_time_compare_date_only_tz (ICalTimetype *a,ICalTimetype *b,ICalTimezone *zone);void i_cal_time_adjust (ICalTimetype *tt,const,gint daysconst,gint hoursconst,gint minutesconst); ICalTimetype * i_cal_time_normalize (gint secondsICalTimetype *t); ICalTimetype * i_cal_time_convert_to_zone (ICalTimetype *t,ICalTimezone *zone);gint i_cal_time_days_in_month (const,gint monthconst);gint yeargint i_cal_time_days_is_leap_year (const);gint yeargint i_cal_time_days_in_year (const); ICalTimeSpan * i_cal_time_span_new (gint yearICalTimetype *dtstart,ICalTimetype *dtend,);gint is_busygint i_cal_time_span_overlaps (ICalTimeSpan *s1,ICalTimeSpan *s2);gint i_cal_time_span_contains (ICalTimeSpan *s,ICalTimeSpan *container); ICalTimetype * i_cal_time_add (ICalTimetype *t,ICalDurationType *d); ICalDurationType * i_cal_time_subtract (ICalTimetype *t1,ICalTimetype *t2);
ICalTimetype * i_cal_time_null_time (void);
Create a default time which is an epoch time
Returns : |
The newly created ICalTimetype. [transfer full] |
Since 1.0
ICalTimetype * i_cal_time_null_date (void);
Create a null date, which indicates no time has been set
Returns : |
The newly created ICalTimetype. [transfer full] |
Since 1.0
ICalTimetype * i_cal_time_current_time_with_zone (ICalTimezone *zone);
Create a ICalTimetype according to the timezone and current time
|
The timezone used to create a ICalTimetype according to the current time. [in][transfer none] |
Returns : |
The newly created ICalTimetype. [transfer full] |
Since 1.0
ICalTimetype * i_cal_time_today (void);
Create a ICalTimetype representing today
Returns : |
The newly created ICalTimetype. [transfer full] |
Since 1.0
ICalTimetype * i_cal_time_from_timet_with_zone (const,time_t v,gint is_dateICalTimezone *zone);
Convert seconds past UNIX epoch to a timetype, using timezones.
|
The seconds past since epoch time |
|
Whether it is a date type, 1 if yes, 0 if not. |
|
The timezone. [in][transfer none] |
Returns : |
The newly created ICalTimetype. [transfer full] |
Since 1.0
ICalTimetype * i_cal_time_from_string (const gchar *str);
create a time from an ISO format string
|
The ISO format string |
Returns : |
The newly created ICalTimetype. [transfer full] |
Since 1.0
ICalTimetype * i_cal_time_from_day_of_year (const,gint dayconst);gint year
Create a new time, given a day of year and a year.
|
The day of a year |
|
The year |
Returns : |
The newly created ICalTimetype. [transfer full] |
Since 1.0
time_t i_cal_time_as_timet (ICalTimetype *tt);
Return the time as seconds past the UNIX epoch
|
The ICalTimetype to be converted |
Returns : |
the time as seconds past the UNIX epoch |
Since 1.0
time_t i_cal_time_as_timet_with_zone (ICalTimetype *tt,ICalTimezone *zone);
Return the time as seconds past the UNIX epoch, using timezones.
|
The ICalTimetype to be converted |
|
The timezone. [in][transfer none] |
Returns : |
the time as seconds past the UNIX epoch |
Since 1.0
gchar * i_cal_time_as_ical_string_r (ICalTimetype *tt);
Return a string represention of the time, in RFC2445 format.
|
The ICalTimetype to be converted |
Returns : |
The string representation. [transfer full] |
Since 1.0
const ICalTimezone * i_cal_time_get_timezone (ICalTimetype *tt);
Return the timezone
|
The ICalTimetype to be queried. [in][transfer none] |
Returns : |
The timezone information. [transfer full] |
Since 1.0
ICalTimetype * i_cal_time_set_timezone (ICalTimetype *tt,ICalTimezone *zone);
Set the timezone
|
The ICalTimetype to be queried |
|
The timezone. [transfer full] |
Returns : |
The ICalTimetype after being set. [transfer full] |
Since 1.0
constgchar * i_cal_time_get_tzid (ICalTimetype *tt);
Return the tzid, or NULL for a floating time
|
The ICalTimetype to be queried. [in][transfer none] |
Returns : |
The tzid of ICalTimetype, or NULL if floating type. [allow-none][transfer none] |
Since 1.0
gint i_cal_time_day_of_year (ICalTimetype *tt);
Return the day of the year of the given time
|
The ICalTimetype to be queried. [in][transfer none] |
Returns : |
the day of the year of the given time |
Since 1.0
gint i_cal_time_day_of_week (ICalTimetype *tt);
Return the day of the week of the given time. Sunday is 1
|
The ICalTimetype to be queried. [in][transfer none] |
Returns : |
the day of the week of the given time. Sunday is 1. |
Since 1.0
gint i_cal_time_start_doy_week (ICalTimetype *tt,);gint fdow
Return the day of the year for the first day of the week that the given time is within.
|
The ICalTimetype to be queried. [in][transfer none] |
|
The first day of the week |
Returns : |
the day of the year for the Sunday of the week that the given time is within. |
Since 1.0
gint i_cal_time_week_number (ICalTimetype *tt);
Return the week number for the week the given time is within.
|
The ICalTimetype to be queried. [in][transfer none] |
Returns : |
the week number for the week the given time is within. |
Since 1.0
gint i_cal_time_is_null_time (ICalTimetype *tt);
Return true of the time is null.
|
The ICalTimetype to be checked. [in][transfer none] |
Returns : |
Whether tt is null_time. 1 if yes, 0 if not. |
Since 1.0
gint i_cal_time_is_valid_time (ICalTimetype *tt);
Return true of the time is null.
|
The ICalTimetype to be checked. [in][transfer none] |
Returns : |
Whether tt is null_time. 1 if yes, 0 if not. |
Since 1.0
gint i_cal_time_is_date (ICalTimetype *tt);
Returns true if time is of DATE type, false if DATE-TIME.
|
The ICalTimetype to be checked. [in][transfer none] |
Returns : |
true if time is of DATE type, false if DATE-TIME. |
Since 1.0
gint i_cal_time_is_utc (ICalTimetype *tt);
Returns true if time is relative to UTC zone.
|
The ICalTimetype to be checked. [in][transfer none] |
Returns : |
true if time is relative to UTC zone. |
Since 1.0
gint i_cal_time_compare (ICalTimetype *a,ICalTimetype *b);
Return -1, 0, or 1 to indicate that a less than b, a==b or a larger than b.
|
The ICalTimetype to be compared. [in][transfer none] |
|
The ICalTimetype to be compared. [in][transfer none] |
Returns : |
-1, 0, or 1 to indicate that a less than b, a==b or a larger than b. |
Since 1.0
gint i_cal_time_compare_date_only (ICalTimetype *a,ICalTimetype *b);
like icaltime_compare, but only use the date parts.
|
The ICalTimetype to be compared. [in][transfer none] |
|
The ICalTimetype to be compared. [in][transfer none] |
Returns : |
-1, 0, or 1 to indicate that a less than b, a==b or a larger than b. |
Since 1.0
gint i_cal_time_compare_date_only_tz (ICalTimetype *a,ICalTimetype *b,ICalTimezone *zone);
like icaltime_compare_tz, but only use the date parts.
|
The ICalTimetype to be compared. [in][transfer none] |
|
The ICalTimetype to be compared. [in][transfer none] |
|
The target timezone. [transfer full] |
Returns : |
-1, 0, or 1 to indicate that a less than b, a==b or a larger than b. |
Since 1.0
void i_cal_time_adjust (ICalTimetype *tt,const,gint daysconst,gint hoursconst,gint minutesconst);gint seconds
like icaltime_compare_tz, but only use the date parts.
|
The ICalTimetype to be set |
|
difference of days adjusted |
|
difference of hours adjusted |
|
difference of minutes adjusted |
|
difference of seconds adjusted |
Since 1.0
ICalTimetype * i_cal_time_normalize (ICalTimetype *t);
Normalize the icaltime, so that all fields are within the normal range.
|
The ICalTimetype to be normalized. [in][transfer none] |
Returns : |
The ICalTimetype normalized. [transfer full] |
Since 1.0
ICalTimetype * i_cal_time_convert_to_zone (ICalTimetype *t,ICalTimezone *zone);
Convert tt, of timezone tzid, into a utc time. Does nothing if the time is already UTC.
|
The ICalTimetype to be normalized. [in][transfer none] |
|
The target timezone. [transfer full] |
Returns : |
The converted ICalTimetype. [transfer full] |
Since 1.0
gint i_cal_time_days_in_month (const,gint monthconst);gint year
Get the number of days in the target month in the target year.
|
The target month |
|
The target year |
Returns : |
The number of days in the target month in the target year. |
Since 1.0
gint i_cal_time_days_is_leap_year (const);gint year
Check whether a year is a leap year.
|
The target year |
Returns : |
1 if year is leap year, 0 if not. |
Since 1.0
gint i_cal_time_days_in_year (const);gint year
Return the number of days in this year.
|
The target year |
Returns : |
Days in this year. |
Since 2.0
ICalTimeSpan * i_cal_time_span_new (ICalTimetype *dtstart,ICalTimetype *dtend,);gint is_busy
Create a new ICalTimeSpan.
|
The start of ICalTimeSpan |
|
The end of ICalTimeSpan |
|
Whether this span is busy |
Returns : |
The newly create ICalTimeSpan. [transfer full] |
Since 1.0
gint i_cal_time_span_overlaps (ICalTimeSpan *s1,ICalTimeSpan *s2);
Check whether two spans overlap.
|
The first ICalTimeSpan |
|
The second ICalTimeSpan |
Returns : |
Whether these two span are overlapped. |
Since 1.0
gint i_cal_time_span_contains (ICalTimeSpan *s,ICalTimeSpan *container);
Check whether one ICalTimeSpan is contained in another ICalTimeSpan.
|
The test ICalTimeSpan |
|
The target container of ICalTimeSpan |
Returns : |
Whether one ICalTimeSpan is contained in another ICalTimeSpan. |
Since 1.0
ICalTimetype * i_cal_time_add (ICalTimetype *t,ICalDurationType *d);
Add a time duration on the time.
|
A ICalTimetype to be operated on. |
|
A |
Returns : |
The ICalTimetype results. The native object is the same. But since it is a bare object, so it won't cause segmentation. [transfer full] |
Since 2.0
ICalDurationType * i_cal_time_subtract (ICalTimetype *t1,ICalTimetype *t2);
Get the duration between two time.
|
The subtracted ICalTimetype. |
|
The subtracting ICalTimetype. |
Returns : |
The |
Since 2.0