Top |
ICalTime *
i_cal_time_clone (const ICalTime *timetype
);
Creates a new ICalTime, copy of timetype
.
Since: 1.0
ICalTime *
i_cal_time_new_null_time (void
);
Creates a default time which is an epoch time.
Since: 1.0
ICalTime *
i_cal_time_new_null_date (void
);
Creates a null date, which indicates no time has been set.
Since: 1.0
ICalTime *
i_cal_time_new_current_with_zone (ICalTimezone *zone
);
Creates a ICalTime according to the timezone and current time.
Since: 1.0
ICalTime *
i_cal_time_new_today (void
);
Creates 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
);
Converts 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
);
Creates 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
);
Creates a new time, given a day of year and a year.
Since: 1.0
time_t
i_cal_time_as_timet (const ICalTime *tt
);
Returns 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
);
Returns the time as seconds past the UNIX epoch, using timezones.
Since: 1.0
gchar *
i_cal_time_as_ical_string (const ICalTime *tt
);
Returns a string representation of the time, in RFC2445 format.
Since: 1.0
ICalTimezone *
i_cal_time_get_timezone (const ICalTime *tt
);
Returns the timezone, the ICalTimezone object is cached and can be either unreferenced once the last
instance is used or can be kept until i_cal_object_free_global_objects()
is called (usually at the very
end of the program).
Since: 1.0
void i_cal_time_set_timezone (ICalTime *tt
,const ICalTimezone *zone
);
Sets the timezone of the tt
.
Since: 1.0
const gchar *
i_cal_time_get_tzid (const ICalTime *tt
);
Returns the tzid, or NULL for a floating time.
Since: 1.0
gint
i_cal_time_day_of_year (const ICalTime *tt
);
Returns the day of the year of the given time.
Since: 1.0
gint
i_cal_time_day_of_week (const ICalTime *tt
);
Returns 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
);
Returns 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
);
Returns the week number for the week the given time is within.
Since: 1.0
gboolean
i_cal_time_is_null_time (const ICalTime *tt
);
Returns true if the time is null.
Since: 1.0
gboolean
i_cal_time_is_valid_time (const ICalTime *tt
);
Returns true if 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
);
i_cal_time_compare returns an integer indicating the result of the comparison, as follow:
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; accepts timezone.
Since: 1.0
void i_cal_time_adjust (ICalTime *tt
,const gint days
,const gint hours
,const gint minutes
,const gint seconds
);
Adds or subtracts a number of days, hours, minutes and seconds from tt
.
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
);
Normalizes the icaltime, so that all fields are within the normal range.
Since: 1.0
void
i_cal_time_normalize_inplace (ICalTime *tt
);
Normalizes 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
);
Converts 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
);
Converts tt
to zone
and store the result into tt
.
Since: 3.0.5
gint i_cal_time_days_in_month (gint month
,gint year
);
Gets 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
);
Checks whether a year is a leap year.
Since: 1.0
gint
i_cal_time_days_in_year (gint year
);
Returns the number of days in this year.
Since: 2.0
ICalTimeSpan * i_cal_time_span_new (ICalTime *dtstart
,ICalTime *dtend
,gint is_busy
);
Creates 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
);
Checks whether two spans overlap.
Since: 1.0
gint i_cal_time_span_contains (ICalTimeSpan *s
,ICalTimeSpan *container
);
Checks whether one ICalTimeSpan is contained in another ICalTimeSpan.
Since: 1.0
ICalTime * i_cal_time_add (ICalTime *t
,ICalDuration *d
);
Adds 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
);
Gets the duration between two time.
Since: 2.0
gint
i_cal_time_get_year (const ICalTime *timetype
);
Gets the year of ICalTime.
Since: 1.0
void i_cal_time_set_year (ICalTime *timetype
,gint year
);
Sets the year of ICalTime.
Since: 1.0
gint
i_cal_time_get_month (const ICalTime *timetype
);
Gets the month of ICalTime.
Since: 1.0
void i_cal_time_set_month (ICalTime *timetype
,gint month
);
Sets the month of ICalTime.
Since: 1.0
gint
i_cal_time_get_day (const ICalTime *timetype
);
Gets the day of ICalTime.
Since: 1.0
void i_cal_time_set_day (ICalTime *timetype
,gint day
);
Sets the day of ICalTime.
Since: 1.0
gint
i_cal_time_get_hour (const ICalTime *timetype
);
Gets the hour of ICalTime.
Since: 1.0
void i_cal_time_set_hour (ICalTime *timetype
,gint hour
);
Sets the hour of ICalTime.
Since: 1.0
gint
i_cal_time_get_minute (const ICalTime *timetype
);
Gets the minute of ICalTime.
Since: 1.0
void i_cal_time_set_minute (ICalTime *timetype
,gint minute
);
Sets the minute of ICalTime.
Since: 1.0
gint
i_cal_time_get_second (const ICalTime *timetype
);
Gets the second of ICalTime.
Since: 1.0
void i_cal_time_set_second (ICalTime *timetype
,gint second
);
Sets the second of ICalTime.
Since: 1.0
void i_cal_time_set_is_date (ICalTime *timetype
,gboolean is_date
);
Sets the is_date of ICalTime.
Since: 1.0
gboolean
i_cal_time_is_daylight (const ICalTime *timetype
);
Gets the is_daylight of ICalTime.
Since: 1.0
void i_cal_time_set_is_daylight (ICalTime *timetype
,gboolean is_daylight
);
Sets the is_daylight of ICalTime.
Since: 1.0
void i_cal_time_get_date (const ICalTime *timetype
,gint *year
,gint *month
,gint *day
);
Gets 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
);
Sets 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
);
Gets 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
);
Sets 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