diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-06-28 21:35:52 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-06-28 21:35:52 +0200 |
commit | b86540b743f1a87a163ffb811c8fe22a01fefa38 (patch) | |
tree | b47cb3bb83c2377234226fb3987ab3320a987dd9 /src/core/util.vala | |
parent | ac6e0b731b9f0b2efd392e3309a5c07e2a66adad (diff) | |
parent | e905d8e16eec152d19797937f13ba3cf4b8f8aca (diff) |
Merge branch 'release/debian/0.32.1-1'debian/0.32.1-1
Diffstat (limited to 'src/core/util.vala')
-rw-r--r-- | src/core/util.vala | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/util.vala b/src/core/util.vala index 9507895..461d2c0 100644 --- a/src/core/util.vala +++ b/src/core/util.vala @@ -190,7 +190,12 @@ public bool null_progress_monitor(uint64 count, uint64 total) { return true; } +public static int64 nullsafe_date_time_comperator(DateTime? time_a, DateTime? time_b) { + if (time_a == null && time_b == null) return 0; -double degrees_to_radians(double theta) { - return (theta * (GLib.Math.PI / 180.0)); -} + if (time_a == null && time_b != null) return -1; + if (time_a != null && time_b == null) return 1; + + return time_a.compare(time_b); + +}
\ No newline at end of file |