diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-06-14 20:35:58 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-06-14 20:35:58 +0200 |
commit | d443a3c2509889533ca812c163056bace396b586 (patch) | |
tree | e94ffc0d9c054ca4efb8fb327e18dfac88e15dc7 /src/core/util.vala | |
parent | bb9797c14470641b082ebf635e2ae3cfd5f27a3b (diff) |
New upstream version 0.32.1upstream/0.32.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 |