utils: Make date comparison follow time comparison semantics

Right now, comparing dates with gcal_date_time_compare_date() gives
the exact opposite result of when comparing using g_date_time_compare().

As shown by this patch, this was a source of *many* bugs.
This commit is contained in:
Georges Basile Stavracas Neto
2020-04-14 19:08:06 +00:00
parent bed8e10609
commit 12fd607d56
12 changed files with 75 additions and 158 deletions
+1 -1
View File
@@ -402,7 +402,7 @@ format_datetime_for_display (GDateTime *date,
string = g_string_new ("");
now = g_date_time_new_now_local ();
days_diff = gcal_date_time_compare_date (now, date);
days_diff = gcal_date_time_compare_date (date, now);
switch (days_diff)
{
+1 -1
View File
@@ -1,6 +1,6 @@
/* gcal-quick-add-popover.c
*
* Copyright (C) 2016 Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
* Copyright (C) 2016-2020 Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by