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:37 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:37 +0200
commitbb80d3feebdc9acc52e3f4ad24084d8425f043a2 (patch)
tree2084a84c39f159c6aea254775dc0880d52579d45 /src/core/util.vala
parentb26ff0798252a1a8072dd2c7a67f6205de9fde11 (diff)
parent31804433d72460cbe0a39f9f8ea5e76058d84cda (diff)
Merge branch 'feature/upstream' into develop
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