aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/timeutil.c
diff options
context:
space:
mode:
authorArturo Espinosa <unammx@src.gnome.org>1998-04-21 02:00:54 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-21 02:00:54 +0800
commit26e5915000652f4807e337a2b370ce0051972f04 (patch)
treee439a67248bf8c320c79774d6247fb5a3c37a05b /calendar/timeutil.c
parentefc1cef1db090cbce9b25260d7f236a21fc7e129 (diff)
downloadgsoc2013-evolution-26e5915000652f4807e337a2b370ce0051972f04.tar.gz
gsoc2013-evolution-26e5915000652f4807e337a2b370ce0051972f04.tar.zst
gsoc2013-evolution-26e5915000652f4807e337a2b370ce0051972f04.zip
A lot of usability changes to GnomeCal -miguel
svn path=/trunk/; revision=168
Diffstat (limited to 'calendar/timeutil.c')
-rw-r--r--calendar/timeutil.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/calendar/timeutil.c b/calendar/timeutil.c
index 09123b3202..df72390bc8 100644
--- a/calendar/timeutil.c
+++ b/calendar/timeutil.c
@@ -104,6 +104,21 @@ time_add_day (time_t time, int days)
}
time_t
+time_add_minutes (time_t time, int minutes)
+{
+ struct tm *tm = localtime (&time);
+ time_t new_time;
+
+ tm->tm_min += minutes;
+ if ((new_time = mktime (tm)) == -1){
+ g_warning ("mktime could not handling adding a day with\n");
+ print_time_t (time);
+ return time;
+ }
+ return new_time;
+}
+
+time_t
time_add_year (time_t time, int years)
{
struct tm *tm = localtime (&time);