summaryrefslogtreecommitdiff
path: root/src/core/util.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:17 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:17 +0200
commit31804433d72460cbe0a39f9f8ea5e76058d84cda (patch)
tree2084a84c39f159c6aea254775dc0880d52579d45 /src/core/util.vala
parenta9898fb3f39c44a85876930ef6b2558052569ae6 (diff)
parentd443a3c2509889533ca812c163056bace396b586 (diff)
Update upstream source from tag 'upstream/0.32.1'
Update to upstream version '0.32.1' with Debian dir c460ad6e13d3c39eaa2d5399059385e64e6fba4c
Diffstat (limited to 'src/core/util.vala')
-rw-r--r--src/core/util.vala11
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