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:
@@ -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,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
|
||||
|
||||
Reference in New Issue
Block a user