diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-15 15:59:09 +0800 |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1998-04-15 15:59:09 +0800 |
commit | f89cf24d2093c9982e461a2478d0acb4eeacc408 (patch) | |
tree | c87e7b2f1ea8090de832c0930c7a675044d0816b /calendar/timeutil.c | |
parent | 3ef4dcf9bbf11bc5b1a83bc4360733e730411f7c (diff) | |
download | gsoc2013-evolution-f89cf24d2093c9982e461a2478d0acb4eeacc408.tar.gz gsoc2013-evolution-f89cf24d2093c9982e461a2478d0acb4eeacc408.tar.zst gsoc2013-evolution-f89cf24d2093c9982e461a2478d0acb4eeacc408.zip |
Year view marks ranges of new dates (on update view). Recurrence iterator
Year view marks ranges of new dates (on update view).
Recurrence iterator functions are here now (clap, clap, clap).
Microsoft Outlook's days are counted.
Miguel.
svn path=/trunk/; revision=139
Diffstat (limited to 'calendar/timeutil.c')
-rw-r--r-- | calendar/timeutil.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/calendar/timeutil.c b/calendar/timeutil.c index c19b394be9..63b78a4152 100644 --- a/calendar/timeutil.c +++ b/calendar/timeutil.c @@ -165,3 +165,38 @@ time_end_of_day (time_t t) return retval; } +time_t +time_year_begin (int year) +{ + struct tm tm; + time_t retval; + + tm.tm_hour = 0; + tm.tm_min = 0; + tm.tm_sec = 0; + tm.tm_year = year; + tm.tm_mon = 0; + tm.tm_mday = 1; + tm.tm_isdst = -1; + + retval = mktime (&tm); + return retval; +} + +time_t +time_year_end (int year) +{ + struct tm tm; + time_t retval; + + tm.tm_hour = 23; + tm.tm_min = 59; + tm.tm_sec = 59; + tm.tm_year = year; + tm.tm_mon = 11; + tm.tm_mday = 31; + tm.tm_isdst = -1; + + retval = mktime (&tm); + return retval; +} |