fix: use %b %3 instead of %1 in timed alarm MSG

%b %3 shows both day offset and verbose time remaining, giving more
context when the reminder fires the day before the event.
This commit is contained in:
2026-06-19 23:16:33 +02:00
parent 15a6d52876
commit 3e106a0b44

View File

@@ -274,7 +274,9 @@ let escape_msg s =
let add_msg b ?(alarm = empty_alarm) ?(timed = false) summary = let add_msg b ?(alarm = empty_alarm) ?(timed = false) summary =
let has_alarm = alarm.day_delta <> "" || alarm.time_delta <> "" || alarm.sched <> "" in let has_alarm = alarm.day_delta <> "" || alarm.time_delta <> "" || alarm.sched <> "" in
let body = escape_msg summary in let body = escape_msg summary in
let body = if has_alarm then if timed then spf "%%\"%s%%\" (%%1)" body else spf "%%\"%s%%\" (%%b)" body else body in let body =
if has_alarm then if timed then spf "%%\"%s%%\" (%%b %%3)" body else spf "%%\"%s%%\" (%%b)" body else body
in
Buffer.add_string b (spf " MSG %s\n" body) Buffer.add_string b (spf " MSG %s\n" body)
let add_location b loc = let add_location b loc =