![]() |
![]() |
![]() |
libical-glib Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <i-cal-time-span> #include <i-cal-timetype> #include <i-cal-timezone> 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 (const time_t v
,gint is_date
); ICalTimetype * i_cal_time_from_timet_with_zone (const time_t v
,gint is_date
,ICalTimezone *zone
); ICalTimetype * i_cal_time_from_string (const gchar *str
); ICalTimetype * i_cal_time_from_day_of_year (const gint day
,const gint year
); time_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
); const gchar * 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_of_week (ICalTimetype *tt
); gint i_cal_time_start_doy_week (ICalTimetype *tt
,gint fdow
); gint 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 days
,const gint hours
,const gint minutes
,const gint seconds
); ICalTimetype * i_cal_time_normalize (ICalTimetype *t
); ICalTimetype * i_cal_time_convert_to_zone (ICalTimetype *t
,ICalTimezone *zone
); gint i_cal_time_days_in_month (const gint month
,const gint year
); gint i_cal_time_days_is_leap_year (const gint year
); ICalTimeSpan * i_cal_time_span_new (ICalTimetype *dtstart
,ICalTimetype *dtend
,gint is_busy
); gint i_cal_time_span_overlaps (ICalTimeSpan *s1
,ICalTimeSpan *s2
); gint i_cal_time_span_contains (ICalTimeSpan *s
,ICalTimeSpan *container
);
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 (const time_t v
,gint is_date
);
Convert seconds past UNIX epoch to a timetype
|
The seconds past since epoch time |
|
Whether it is a date type, 1 if yes, 0 if not. |
Returns : |
The newly created ICalTimetype. [transfer full] |
Since 1.0
ICalTimetype * i_cal_time_from_timet_with_zone (const time_t v
,gint is_date
,ICalTimezone *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 day
,const 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
const gchar * 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_of_week (ICalTimetype *tt
);
Return the day of the year for the Sunday of the week that the given time is within.
|
The ICalTimetype to be queried. [in][transfer none] |
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_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 days
,const gint hours
,const gint minutes
,const 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 month
,const 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
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