aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src/libical/icaltime.h
diff options
context:
space:
mode:
Diffstat (limited to 'libical/src/libical/icaltime.h')
-rw-r--r--libical/src/libical/icaltime.h58
1 files changed, 37 insertions, 21 deletions
diff --git a/libical/src/libical/icaltime.h b/libical/src/libical/icaltime.h
index 64617e578d..d624041c29 100644
--- a/libical/src/libical/icaltime.h
+++ b/libical/src/libical/icaltime.h
@@ -5,6 +5,7 @@
$Id$
+
$Locker$
(C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
@@ -50,8 +51,38 @@ struct icaltimetype
int is_utc; /* 1-> time is in UTC timezone */
int is_date; /* 1 -> interpret this as date. */
+
+ const char* zone; /*Ptr to Olsen placename. Libical does not own mem*/
};
+/* Convert seconds past UNIX epoch to a timetype*/
+struct icaltimetype icaltime_from_timet(time_t v, int is_date);
+time_t icaltime_as_timet(struct icaltimetype);
+char* icaltime_as_ical_string(struct icaltimetype tt);
+
+/* Like icaltime_from_timet(), except that the input may be in seconds
+ past the epoch in floating time */
+struct icaltimetype icaltime_from_int(int v, int is_date, int is_utc);
+int icaltime_as_int(struct icaltimetype);
+
+/* create a time from an ISO format string */
+struct icaltimetype icaltime_from_string(const char* str);
+
+/* Routines for handling timezones */
+/* Return the offset of the named zone as seconds. tt is a time
+ indicating the date for which you want the offset */
+int icaltime_utc_offset(struct icaltimetype tt, const char* tzid);
+
+/* convert tt, of timezone tzid, into a utc time. Does nothing if the
+ time is already UTC. */
+struct icaltimetype icaltime_as_utc(struct icaltimetype tt,
+ const char* tzid);
+
+/* convert tt, a time in UTC, into a time in timezone tzid */
+struct icaltimetype icaltime_as_zone(struct icaltimetype tt,
+ const char* tzid);
+
+
struct icaltimetype icaltime_null_time(void);
int icaltime_is_null_time(struct icaltimetype t);
@@ -64,9 +95,6 @@ struct icaltimetype icaltime_from_day_of_year(short doy, short year);
short icaltime_day_of_week(struct icaltimetype t);
short icaltime_start_doy_of_week(struct icaltimetype t);
-struct icaltimetype icaltime_from_timet(time_t v, int is_date, int is_utc);
-struct icaltimetype icaltime_from_string(const char* str);
-time_t icaltime_as_timet(struct icaltimetype);
char* icaltime_as_ctime(struct icaltimetype);
short icaltime_week_number(short day_of_month, short month, short year);
@@ -80,22 +108,6 @@ int icaltime_compare_date_only(struct icaltimetype a, struct icaltimetype b);
short icaltime_days_in_month(short month,short year);
-/* Routines for handling timezones */
-
-/* Return the offset of the named zone as seconds. tt is a time
- indicating the date for which you want the offset */
-time_t icaltime_utc_offset(struct icaltimetype tt, const char* tzid);
-
-time_t icaltime_local_utc_offset();
-
-
-/* convert tt, of timezone tzid, into a utc time */
-struct icaltimetype icaltime_as_utc(struct icaltimetype tt,const char* tzid);
-
-/* convert tt, a time in UTC, into a time in timezone tzid */
-struct icaltimetype icaltime_as_zone(struct icaltimetype tt,const char* tzid);
-
-
struct icaldurationtype
{
@@ -107,9 +119,10 @@ struct icaldurationtype
unsigned int seconds;
};
-struct icaldurationtype icaldurationtype_from_timet(time_t t);
+struct icaldurationtype icaldurationtype_from_int(int t);
struct icaldurationtype icaldurationtype_from_string(const char*);
-time_t icaldurationtype_as_timet(struct icaldurationtype duration);
+int icaldurationtype_as_int(struct icaldurationtype duration);
+char* icaldurationtype_as_ical_string(struct icaldurationtype d);
struct icalperiodtype
@@ -119,6 +132,9 @@ struct icalperiodtype
struct icaldurationtype duration;
};
+struct icalperiodtype icalperiodtype_from_string (const char* str);
+const char* icalperiodtype_as_ical_string(struct icalperiodtype p);
+
time_t icalperiodtype_duration(struct icalperiodtype period);
time_t icalperiodtype_end(struct icalperiodtype period);