aboutsummaryrefslogtreecommitdiff
path: root/src/ics.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/ics.ml')
-rw-r--r--src/ics.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ics.ml b/src/ics.ml
index f1b6cc5..888e9e8 100644
--- a/src/ics.ml
+++ b/src/ics.ml
@@ -57,12 +57,19 @@ module Event = struct
"END:VEVENT\n"]
|> List.map ics_split_line
|> String.concat "\n"
+
+ let has_groups groups event =
+ List.fold_left (fun found group ->
+ found || List.exists ((=) group) groups) false event.groups
end
type t = Event.t list
let make events = events
+let filter_groups groups =
+ List.filter (Event.has_groups groups)
+
let gen_vtimezone tz =
if tz <> "" then
["BEGIN:VTIMEZONE";