74#include "libical_ical_export.h"
78#define icaltime_t time_t
82#if !defined(ICALTIMEZONE_DEFINED)
83#define ICALTIMEZONE_DEFINED
115#define ICALTIMETYPE_INITIALIZER { 0, 0, 0, 0, 0, 0, 0, 0, 0}
338 const int days,
const int hours,
339 const int minutes,
const int seconds);
bool icaltime_span_overlaps(icaltime_span *s1, icaltime_span *s2)
Returns true if the two spans overlap.
Definition icaltime.c:914
int icaltime_compare(const struct icaltimetype a, const struct icaltimetype b)
Returns -1, 0, or 1 to indicate that a is less than b, a equals b, or a is greater than b.
Definition icaltime.c:633
struct icaltime_span icaltime_span_new(struct icaltimetype dtstart, struct icaltimetype dtend, bool is_busy)
Builds an icaltimespan given a start time, end time and busy value.
Definition icaltime.c:899
int icaltime_compare_date_only(const struct icaltimetype a, const struct icaltimetype b)
Like icaltime_compare, but only use the date parts.
Definition icaltime.c:688
bool icaltime_is_date(const struct icaltimetype t)
Returns true if time is a DATE.
Definition icaltime.c:614
struct icaltimetype icaltime_from_string(const char *str)
Constructor.
Definition icaltime.c:358
const char * icaltime_get_tzid(const struct icaltimetype t)
Returns the tzid, or NULL for a floating time.
Definition icaltime.c:874
struct icaltimetype icaltime_from_day_of_year(const int doy, const int year)
Constructor.
Definition icaltime.c:539
struct icaltimetype icaltime_current_time_with_zone(const icaltimezone *zone)
Convenience constructor.
Definition icaltime.c:236
int icaltime_day_of_year(const struct icaltimetype t)
Returns the day of the year, counting from 1 (Jan 1st).
Definition icaltime.c:532
int icaltime_start_doy_week(const struct icaltimetype t, int fdow)
Returns the day of the year for the first day of the week that the given time is within.
Definition icaltime.c:495
time_t icaltime_as_timet_with_zone(const struct icaltimetype tt, const icaltimezone *zone)
Returns the time as seconds past the UNIX epoch, using the given timezone.
Definition icaltime.c:278
bool icaltime_is_leap_year(const int year)
Returns whether the specified year is a leap year.
Definition icaltime.c:434
const icaltimezone * icaltime_get_timezone(const struct icaltimetype t)
Returns the timezone.
Definition icaltime.c:869
int icaltime_week_number(const struct icaltimetype t)
Returns the week number for the week the given time is within.
Definition icaltime.c:516
int icaltime_day_of_week(const struct icaltimetype t)
Returns the day of the week of the given time.
Definition icaltime.c:480
struct icaltimetype icaltime_today(void)
Convenience constructor.
Definition icaltime.c:241
time_t icaltime_as_timet(const struct icaltimetype)
Definition icaltime.c:246
struct icaltimetype icaltime_null_date(void)
Constructor.
Definition icaltime.c:583
struct _icaltimezone icaltimezone
An opaque struct representing a timezone. We declare this here to avoid a circular dependency.
Definition icaltime.h:84
bool icaltime_is_valid_time(const struct icaltimetype t)
Returns false if the time is clearly invalid, but is not null.
Definition icaltime.c:602
const char * icaltime_as_ical_string(const struct icaltimetype tt)
Returns a string representation of the time, in RFC5545 format.
Definition icaltime.c:316
int icaltime_days_in_month(const int month, const int year)
Definition icaltime.c:454
bool icaltime_is_utc(const struct icaltimetype t)
Returns true if the time is relative to UTC zone.
Definition icaltime.c:619
struct icaltimetype icaltime_convert_to_zone(const struct icaltimetype tt, icaltimezone *zone)
Converts time to a given timezone.
Definition icaltime.c:840
bool icaltime_span_contains(icaltime_span *s, icaltime_span *container)
Returns true if the span is totally within the containing span.
Definition icaltime.c:938
int icaltime_compare_date_only_tz(const struct icaltimetype a, const struct icaltimetype b, icaltimezone *tz)
Like icaltime_compare, but only use the date parts; accepts timezone.
Definition icaltime.c:718
int icaltime_days_in_year(const int year)
Definition icaltime.c:443
bool icaltime_is_null_time(const struct icaltimetype t)
Returns true if the time is null.
Definition icaltime.c:624
struct icaltimetype icaltime_normalize(const struct icaltimetype tt)
Normalizes the icaltime, so all of the time components are in their normal ranges.
Definition icaltime.c:350
struct icaltimetype icaltime_set_timezone(struct icaltimetype *t, const icaltimezone *zone)
Sets the timezone.
Definition icaltime.c:883
void icaltime_adjust(struct icaltimetype *tt, const int days, const int hours, const int minutes, const int seconds)
Internal, shouldn't be part of the public API.
Definition icaltime.c:755
struct icaltimetype icaltime_null_time(void)
Constructor.
Definition icaltime.c:574
struct icaltimetype icaltime_from_timet_with_zone(const time_t tm, const bool is_date, const icaltimezone *zone)
Constructor.
char * icaltime_as_ical_string_r(const struct icaltimetype tt)
Returns a string representation of the time, in RFC5545 format.
Definition icaltime.c:325
Definition icaltimezoneimpl.h:14
time_t start
Definition icaltime.h:90
time_t end
Definition icaltime.h:91
int is_busy
Definition icaltime.h:92
int is_date
Definition icaltime.h:106
int year
Definition icaltime.h:99
int is_daylight
Definition icaltime.h:108
const icaltimezone * zone
Definition icaltime.h:110
int month
Definition icaltime.h:100