docs: fix yearly recurrence format and clarify sort/limitations

- Fix `REM Mon DD` → `REM MMM DD` in yearly recurrence table
- Clarify `--sort original` preserves processing order in CLI reference
- Update `RELATED=END` trigger behaviour (treated as `RELATED=START`)
- Remove unsupported EXDATE/RDATE+override limitation (now handled)
- Fix `--sort none` → `--sort original` in CLI help text
- Remove EXDATE/RDATE/override guard from `simple_recurrence`
This commit is contained in:
2026-05-24 18:15:38 +02:00
parent 25aeff8cc8
commit 37e72e41fb
3 changed files with 28 additions and 34 deletions

View File

@@ -43,7 +43,7 @@ type sort_order = Asc | Desc | Original
let sort_order_enum = [ ("asc", Asc); ("desc", Desc); ("original", Original) ]
let sort =
let doc = "Output sort order by date: $(b,desc) (default), $(b,asc), or $(b,none) (file order)." in
let doc = "Output sort order by date: $(b,desc) (default), $(b,asc), or $(b,original) (processing order)." in
Arg.(value & opt (enum sort_order_enum) Desc & info [ "sort" ] ~docv:"ORDER" ~doc)
let source =

View File

@@ -126,35 +126,30 @@ let simple_recurrence rem ev : (Remind.rem, error) result =
match ev.rrule with
| Some (_, (`Yearly, None, None, [])) -> Ok rem (* handled in yearly_simple_date *)
| Some (_, ((`Weekly as freq), count_or_until, interval, recurs))
| Some (_, ((`Daily as freq), count_or_until, interval, recurs)) ->
begin if List.length rem.recurring > 0 then (
Utils.warn "Warning: complex recurrence with EXDATE/RDATE/overrides not supported, skipping (UID: %s)\n"
(Utils.get_uid ev);
skip)
else
let days =
ListLabels.filter_map recurs ~f:(function
| `Byday days -> begin List.map (fun (_n, weekday) -> weekday) days |> Option.some end
| _ -> None)
|> List.flatten
in
let week_start =
ListLabels.find_map recurs ~f:(function
| `Weekday `Sunday -> Some `Sunday
| `Weekday `Monday -> Some `Monday
| _ -> None)
in
match freq with
| `Daily -> Ok { rem with Remind.weekly = None; Remind.daily = Some { count_or_until; interval; week_start } }
| `Weekly ->
let days = if days = [] then [ timedesc_wd_to_ical (Timedesc.Date.weekday rem.date) ] else days in
Ok
{
rem with
Remind.daily = None;
Remind.weekly = Some { count_or_until; interval; byday = days; week_start };
}
end
| Some (_, ((`Daily as freq), count_or_until, interval, recurs)) -> begin
let days =
ListLabels.filter_map recurs ~f:(function
| `Byday days -> begin List.map (fun (_n, weekday) -> weekday) days |> Option.some end
| _ -> None)
|> List.flatten
in
let week_start =
ListLabels.find_map recurs ~f:(function
| `Weekday `Sunday -> Some `Sunday
| `Weekday `Monday -> Some `Monday
| _ -> None)
in
match freq with
| `Daily -> Ok { rem with Remind.weekly = None; Remind.daily = Some { count_or_until; interval; week_start } }
| `Weekly ->
let days = if days = [] then [ timedesc_wd_to_ical (Timedesc.Date.weekday rem.date) ] else days in
Ok
{
rem with
Remind.daily = None;
Remind.weekly = Some { count_or_until; interval; byday = days; week_start };
}
end
| Some (_, (`Monthly, count_or_until, interval, recurs)) ->
begin match interval with
| Some n when n > 1 ->