fix: sort reminders by date in descending order before output

This commit is contained in:
2026-05-17 00:43:25 +02:00
parent 5a584a8440
commit 0bd014c1fe

View File

@@ -58,6 +58,7 @@ let ical2rem ical_files =
good_rems_acc) good_rems_acc)
in 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)) try ListLabels.iter good_rems ~f:(fun rem -> Printf.printf "%s" (Remind.string_of_rem rem))
with e -> with e ->
Printf.eprintf "Error processing reminders: %s\n" (Printexc.to_string e); Printf.eprintf "Error processing reminders: %s\n" (Printexc.to_string e);