From 0bd014c1feaf7a9103bdd394767539d0316cc7b3 Mon Sep 17 00:00:00 2001 From: Paolo Donadeo Date: Sun, 17 May 2026 00:43:25 +0200 Subject: [PATCH] fix: sort reminders by date in descending order before output --- bin/main.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/main.ml b/bin/main.ml index abd1f81..2c6da95 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -58,6 +58,7 @@ let ical2rem ical_files = good_rems_acc) in + let good_rems = List.sort (fun a b -> Timedesc.Date.compare b.Remind.date a.Remind.date) good_rems in try ListLabels.iter good_rems ~f:(fun rem -> Printf.printf "%s" (Remind.string_of_rem rem)) with e -> Printf.eprintf "Error processing reminders: %s\n" (Printexc.to_string e);