Command-line and Emacs Calendar Client
1type instance = { event : Event.t; start : Ptime.t; end_ : Ptime.t option }
2(** Instances of recurring events with adjusted start/end times *)
3
4module Instance : sig
5 type t = instance
6
7 type comparator = t -> t -> int
8 (** Instance comparator function type *)
9
10 val by_start : comparator
11 (** Compare instances by start time, earlier times come first *)
12
13 val by_end : comparator
14 (** Compare instances by end time, earlier times come first.
15 Instances with end times come after those without *)
16
17 val by_event : Event.comparator -> comparator
18 (** Apply an event comparator to instances *)
19
20 val descending : comparator -> comparator
21 (** Reverse the order of a comparator *)
22end
23
24val expand_event :
25 Event.t -> from:Ptime.t option -> to_:Ptime.t -> instance list
26(** Generates all instances of an event within a date range, including the
27 original and recurrences. If the event result is an Error, returns an empty
28 list. *)
29
30val parse_recurrence :
31 string -> (Icalendar.recurrence, [ `Msg of string ]) result