| Top |
ICalTime *
i_cal_time_clone (const ICalTime *timetype);
Create a new ICalTime, copy of timetype
.
Since: 1.0
ICalTime *
i_cal_time_new_null_time (void);
Create a default time which is an epoch time
Since: 1.0
ICalTime *
i_cal_time_new_null_date (void);
Create a null date, which indicates no time has been set
Since: 1.0
ICalTime *
i_cal_time_new_current_with_zone (ICalTimezone *zone);
Create a ICalTime according to the timezone and current time
Since: 1.0
ICalTime *
i_cal_time_new_today (void);
Create a ICalTime representing today
Since: 1.0
ICalTime * i_cal_time_new_from_timet_with_zone (const time_t v,gint is_date,ICalTimezone *zone);
Convert seconds past UNIX epoch to a timetype, using timezones.
v |
The seconds past since epoch time |
|
is_date |
Whether it is a date type, 1 if yes, 0 if not. |
|
zone |
The timezone, or |
[nullable] |
Since: 1.0
ICalTime *
i_cal_time_new_from_string (const gchar *str);
create a time from an ISO format string
Since: 1.0
ICalTime * i_cal_time_new_from_day_of_year (const gint day,const gint year);
Create a new time, given a day of year and a year.
Since: 1.0
time_t
i_cal_time_as_timet (const ICalTime *tt);
Return the time as seconds past the UNIX epoch
Since: 1.0
time_t i_cal_time_as_timet_with_zone (const ICalTime *tt,const ICalTimezone *zone);
Return the time as seconds past the UNIX epoch, using timezones.
Since: 1.0
gchar *
i_cal_time_as_ical_string (const ICalTime *tt);
Return a string represention of the time, in RFC2445 format.
Since: 1.0
ICalTimezone *
i_cal_time_get_timezone (const ICalTime *tt);
Return the timezone
Since: 1.0
void i_cal_time_set_timezone (ICalTime *tt,const ICalTimezone *zone);
Set the timezone of the tt
Since: 1.0
const gchar *
i_cal_time_get_tzid (const ICalTime *tt);
Return the tzid, or NULL for a floating time
Since: 1.0
gint
i_cal_time_day_of_year (const ICalTime *tt);
Return the day of the year of the given time
Since: 1.0
gint
i_cal_time_day_of_week (const ICalTime *tt);
Return the day of the week of the given time. Sunday is 1
Since: 1.0
gint i_cal_time_start_doy_week (const ICalTime *tt,gint fdow);
Return the day of the year for the first day of the week that the given time is within.
Since: 1.0
gint
i_cal_time_week_number (const ICalTime *tt);
Return the week number for the week the given time is within.
Since: 1.0
gboolean
i_cal_time_is_null_time (const ICalTime *tt);
Return true of the time is null.
Since: 1.0
gboolean
i_cal_time_is_valid_time (const ICalTime *tt);
Return true of the time is null.
Since: 1.0
gboolean
i_cal_time_is_date (const ICalTime *tt);
Returns true if time is of DATE type, false if DATE-TIME.
Since: 1.0
gboolean
i_cal_time_is_utc (const ICalTime *tt);
Returns true if time is relative to UTC zone.
Since: 1.0
gint i_cal_time_compare (const ICalTime *a,const ICalTime *b);
Return -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 (const ICalTime *a,const ICalTime *b);
like i_cal_time_compare, but only use the date parts.
Since: 1.0
gint i_cal_time_compare_date_only_tz (const ICalTime *a,const ICalTime *b,ICalTimezone *zone);
like i_cal_time_compare_tz, but only use the date parts.
Since: 1.0
void i_cal_time_adjust (ICalTime *tt,const gint days,const gint hours,const gint minutes,const gint seconds);
like i_cal_time_compare_tz, but only use the date parts.
tt |
The ICalTime to be set |
|
days |
difference of days adjusted |
|
hours |
difference of hours adjusted |
|
minutes |
difference of minutes adjusted |
|
seconds |
difference of seconds adjusted |
Since: 1.0
ICalTime *
i_cal_time_normalize (const ICalTime *t);
Normalize the icaltime, so that all fields are within the normal range.
Since: 1.0
void
i_cal_time_normalize_inplace (ICalTime *tt);
Normalize the tt
, so that all fields are within the normal range.
Since: 3.0.5
ICalTime * i_cal_time_convert_to_zone (const ICalTime *tt,ICalTimezone *zone);
Convert tt
to zone
and return new ICalTime object.
tt |
The ICalTime to be converted. |
[in][transfer none] |
zone |
The target timezone. |
[nullable] |
Since: 1.0
void i_cal_time_convert_to_zone_inplace (ICalTime *tt,ICalTimezone *zone);
Convert tt
to zone
and store the result into tt
.
Since: 3.0.5
gint i_cal_time_days_in_month (gint month,gint year);
Get the number of days in the target month in the target year.
Since: 1.0
gboolean
i_cal_time_days_is_leap_year (gint year);
Check whether a year is a leap year.
Since: 1.0
gint
i_cal_time_days_in_year (gint year);
Return the number of days in this year.
Since: 2.0
ICalTimeSpan * i_cal_time_span_new (ICalTime *dtstart,ICalTime *dtend,gint is_busy);
Create a new ICalTimeSpan.
dtstart |
The start of ICalTimeSpan |
|
dtend |
The end of ICalTimeSpan |
|
is_busy |
Whether this span is busy |
Since: 1.0
gint i_cal_time_span_overlaps (ICalTimeSpan *s1,ICalTimeSpan *s2);
Check whether two spans overlap.
Since: 1.0
gint i_cal_time_span_contains (ICalTimeSpan *s,ICalTimeSpan *container);
Check whether one ICalTimeSpan is contained in another ICalTimeSpan.
Since: 1.0
ICalTime * i_cal_time_add (ICalTime *t,ICalDuration *d);
Add a time duration on the time.
The ICalTime 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
ICalDuration * i_cal_time_subtract (ICalTime *t1,ICalTime *t2);
Get the duration between two time.
Since: 2.0
gint
i_cal_time_get_year (const ICalTime *timetype);
Get the year of ICalTime.
Since: 1.0
void i_cal_time_set_year (ICalTime *timetype,gint year);
Set the year of ICalTime.
Since: 1.0
gint
i_cal_time_get_month (const ICalTime *timetype);
Get the month of ICalTime.
Since: 1.0
void i_cal_time_set_month (ICalTime *timetype,gint month);
Set the month of ICalTime.
Since: 1.0
gint
i_cal_time_get_day (const ICalTime *timetype);
Get the day of ICalTime.
Since: 1.0
void i_cal_time_set_day (ICalTime *timetype,gint day);
Set the day of ICalTime.
Since: 1.0
gint
i_cal_time_get_hour (const ICalTime *timetype);
Get the hour of ICalTime.
Since: 1.0
void i_cal_time_set_hour (ICalTime *timetype,gint hour);
Set the hour of ICalTime.
Since: 1.0
gint
i_cal_time_get_minute (const ICalTime *timetype);
Get the minute of ICalTime.
Since: 1.0
void i_cal_time_set_minute (ICalTime *timetype,gint minute);
Set the minute of ICalTime.
Since: 1.0
gint
i_cal_time_get_second (const ICalTime *timetype);
Get the second of ICalTime.
Since: 1.0
void i_cal_time_set_second (ICalTime *timetype,gint second);
Set the second of ICalTime.
Since: 1.0
void i_cal_time_set_is_date (ICalTime *timetype,gboolean is_date);
Set the is_date of ICalTime.
Since: 1.0
gboolean
i_cal_time_is_daylight (const ICalTime *timetype);
Get the is_daylight of ICalTime.
Since: 1.0
void i_cal_time_set_is_daylight (ICalTime *timetype,gboolean is_daylight);
Set the is_daylight of ICalTime.
Since: 1.0
void i_cal_time_get_date (const ICalTime *timetype,gint *year,gint *month,gint *day);
Get the year/month/date parts of the timetype
in one call.
timetype |
The ICalTime to be queried. |
|
year |
Out parameter for the 'year' part of the date. |
[out caller-allocates][optional] |
month |
Out parameter for the 'month' part of the date. |
[out caller-allocates][optional] |
day |
Out parameter for the 'day' part of the date. |
[out caller-allocates][optional] |
Since: 1.0
void i_cal_time_set_date (ICalTime *timetype,gint year,gint month,gint day);
Set the year/month/date parts of the timetype
in one call. This doesn't verify validity of the given
date.
timetype |
The ICalTime to be set to. |
|
year |
The 'year' part of the date. |
|
month |
The 'month' part of the date. |
|
day |
The 'day' part of the date. |
Since: 1.0
void i_cal_time_get_time (const ICalTime *timetype,gint *hour,gint *minute,gint *second);
Get the hour/minute/second parts of the timetype
in one call.
timetype |
The ICalTime to be queried. |
|
hour |
Out parameter for the 'hour' part of the time. |
[out caller-allocates][optional] |
minute |
Out parameter for the 'minute' part of the time. |
[out caller-allocates][optional] |
second |
Out parameter for the 'second' part of the time. |
[out caller-allocates][optional] |
Since: 1.0
void i_cal_time_set_time (ICalTime *timetype,gint hour,gint minute,gint second);
Set the hour/minute/second parts of the timetype
in one call. This doesn't verify validity of the given
time.
timetype |
The ICalTime to be set to. |
|
hour |
The 'hour' part of the time. |
|
minute |
The 'minute' part of the time. |
|
second |
The 'second' part of the time. |
Since: 1.0