aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils.c4
1 files changed, 4 insertions, 0 deletions
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);