From 375277fa6b2c8eaac2e2a824bd1e43bbd54b75e3 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 9 Mar 2014 17:46:08 -0500 Subject: in utils.c's generate_full_format_string_at_time(), test to see if the event time occurred before the current time --- src/utils.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/utils.c') diff --git a/src/utils.c b/src/utils.c index f4eb53f..354e389 100644 --- a/src/utils.c +++ b/src/utils.c @@ -159,6 +159,10 @@ getDateProximity(GDateTime* now, GDateTime* time) gint now_year, now_month, now_day; gint time_year, time_month, time_day; + // did it already happen? + if (g_date_time_compare (now, time) > 0) + return DATE_PROXIMITY_FAR; + // does it happen today? g_date_time_get_ymd(now, &now_year, &now_month, &now_day); g_date_time_get_ymd(time, &time_year, &time_month, &time_day); -- cgit v1.2.3