Libical API Documentation 3.0
|
Methods for working with durations in iCal. More...
Go to the source code of this file.
Data Structures | |
struct | icaldurationtype |
A struct representing a duration. More... | |
Macros | |
#define | ICALDURATIONTYPE_INITIALIZER { 0, 0, 0, 0, 0, 0 } |
Functions | |
char * | icaldurationtype_as_ical_string (struct icaldurationtype d) |
char * | icaldurationtype_as_ical_string_r (struct icaldurationtype d) |
int | icaldurationtype_as_int (struct icaldurationtype duration) |
Converts an icaldurationtype into the duration in seconds as int . | |
struct icaldurationtype | icaldurationtype_bad_duration (void) |
Creates a bad duration (used to indicate error). | |
struct icaldurationtype | icaldurationtype_from_int (int t) |
Creates a new icaldurationtype from a duration in seconds. | |
struct icaldurationtype | icaldurationtype_from_string (const char *dur) |
Creates a new icaldurationtype from a duration given as a string. | |
int | icaldurationtype_is_bad_duration (struct icaldurationtype d) |
Checks if a duration is a bad duration. | |
int | icaldurationtype_is_null_duration (struct icaldurationtype d) |
Checks if a duration is a null duration. | |
struct icaldurationtype | icaldurationtype_null_duration (void) |
Creates a duration with zero length. | |
struct icaltimetype | icaltime_add (struct icaltimetype t, struct icaldurationtype d) |
Adds a duration to an icaltime object and returns the result. | |
struct icaldurationtype | icaltime_subtract (struct icaltimetype t1, struct icaltimetype t2) |
Returns the difference between two icaltimetype as a duration. | |
Methods for working with durations in iCal.
char * icaldurationtype_as_ical_string | ( | struct icaldurationtype | d | ) |
Converts an icaldurationtype into the iCal format as string.
d | is the icaldurationtype to convert to iCal format |
d
in iCal format free()
after it's no longer needed.char * icaldurationtype_as_ical_string_r | ( | struct icaldurationtype | d | ) |
Converts an icaldurationtype into the iCal format as string.
d | is the icaldurationtype to convert to iCal format |
d
in iCal format int icaldurationtype_as_int | ( | struct icaldurationtype | duration | ) |
Converts an icaldurationtype into the duration in seconds as int
.
duration | The duration to convert to seconds |
int
representing the duration in secondsstruct icaldurationtype icaldurationtype_bad_duration | ( | void | ) |
Creates a bad duration (used to indicate error).
struct icaldurationtype icaldurationtype_from_int | ( | int | t | ) |
Creates a new icaldurationtype from a duration in seconds.
t | The duration in seconds |
struct icaldurationtype icaldurationtype_from_string | ( | const char * | dur | ) |
Creates a new icaldurationtype from a duration given as a string.
dur | The duration as a string |
int icaldurationtype_is_bad_duration | ( | struct icaldurationtype | d | ) |
Checks if a duration is a bad duration.
d | The duration to check |
int icaldurationtype_is_null_duration | ( | struct icaldurationtype | d | ) |
Checks if a duration is a null duration.
d | The duration to check |
struct icaldurationtype icaldurationtype_null_duration | ( | void | ) |
Creates a duration with zero length.
struct icaltimetype icaltime_add | ( | struct icaltimetype | t, |
struct icaldurationtype | d | ||
) |
Adds a duration to an icaltime object and returns the result.
t | The time object to add the duration to |
d | The duration to add to the time object |
struct icaldurationtype icaltime_subtract | ( | struct icaltimetype | t1, |
struct icaltimetype | t2 | ||
) |
Returns the difference between two icaltimetype as a duration.
t1 | The first point in time |
t2 | The second point in time |