use -Wl on -no-undefined as it is a linker option:
[oweals/gnunet.git] / src / include / gnunet_time_lib.h
index a739d6d7f0ec7ce8f669c397a58ee5943da5e3ea..4db73966cfc0e4479a6acb583945d0b77f6116d1 100644 (file)
@@ -483,10 +483,37 @@ GNUNET_TIME_set_offset (long long offset);
  *
  * @return the offset we currently skew the locale time by
  */
-long long 
+long long
 GNUNET_TIME_get_offset (void);
 
 
+/**
+ * Return the current year (i.e. '2011').
+ */
+unsigned int
+GNUNET_TIME_get_current_year (void);
+
+
+/**
+ * Convert a year to an expiration time of January 1st of that year.
+ *
+ * @param year a year (after 1970, please ;-)).
+ * @return absolute time for January 1st of that year.
+ */
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_year_to_time (unsigned int year);
+
+
+/**
+ * Convert an expiration time to the respective year (rounds)
+ *
+ * @param at absolute time
+ * @return year a year (after 1970), 0 on error
+ */
+unsigned int
+GNUNET_TIME_time_to_year (struct GNUNET_TIME_Absolute at);
+
+
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
 #endif