aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-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..c9107ce 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_difference(time, now) < -G_USEC_PER_SEC)
+ 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);