From 96439bc6fffe21b8359bd825aa89fc586d36380a Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 2 Oct 1998 23:59:35 +0000 Subject: Changed name from time_start_of_day() to be consistent with the other 1998-10-02 Federico Mena Quintero * timeutil.c (time_day_begin): Changed name from time_start_of_day() to be consistent with the other begin/end functions. (time_day_end): Likewise. * calobj.c (ical_object_get_first_weekday): New public function to get the first toggled day in a weekday mask. Since we do not support multiple weekdays in a monthly-by-pos rule, we just fetch the first toggled one. (ical_object_generate_events): Added a missing break statement. * timeutil.c (time_month_end): Made it consistent with the rest of the time begin/end functions -- now it returns the first second of the *next* month. (time_week_end): Actually implemented this function. It will be used when the week view is rewritten. * calobj.c (time_in_range): Fix off-by-one in the comparison of the time against the end time. * gncal-full-day.c (expand_space): Fixed bug where the columns not were being expanded due to a missing "slot + j". svn path=/trunk/; revision=425 --- calendar/timeutil.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'calendar/timeutil.h') diff --git a/calendar/timeutil.h b/calendar/timeutil.h index ac006012ac..2c2ddfcbac 100644 --- a/calendar/timeutil.h +++ b/calendar/timeutil.h @@ -43,10 +43,12 @@ int time_days_in_month (int year, int month); */ time_t time_from_day (int year, int month, int day); -time_t time_start_of_day (time_t t); -time_t time_end_of_day (time_t t); time_t time_day_hour (time_t t, int hour); +/* For the functions below, time ranges are considered to contain the start time, but not the end + * time. + */ + /* These two functions take a time value and return the beginning or end of the corresponding year, * respectively. */ @@ -65,6 +67,13 @@ time_t time_month_end (time_t t); time_t time_week_begin (time_t t); time_t time_week_end (time_t t); +/* These two functions take a time value and return the beginning or end of the corresponding day, + * respectively. + */ +time_t time_day_begin (time_t t); +time_t time_day_end (time_t t); + + time_t parse_date (char *str); void print_time_t (time_t t); -- cgit v1.2.3