diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-03-09 17:46:08 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2014-03-09 17:46:08 -0500 |
commit | 375277fa6b2c8eaac2e2a824bd1e43bbd54b75e3 (patch) | |
tree | 8aa606db2e916c8e2cb7f637ef406ea480776841 | |
parent | 16b0ab32fe1b849523931ed33dbdd7ce0f9bac3f (diff) | |
download | ayatana-indicator-datetime-375277fa6b2c8eaac2e2a824bd1e43bbd54b75e3.tar.gz ayatana-indicator-datetime-375277fa6b2c8eaac2e2a824bd1e43bbd54b75e3.tar.bz2 ayatana-indicator-datetime-375277fa6b2c8eaac2e2a824bd1e43bbd54b75e3.zip |
in utils.c's generate_full_format_string_at_time(), test to see if the event time occurred before the current time
-rw-r--r-- | src/utils.c | 4 |
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); |