refactor(predicates): return features instead of bool, add P00/P11 predicates
- Change predicate return type from `bool` to `features list option` to carry extracted event data (Summary, Day_start, Multi_day) alongside match results - Add `features` type with Generic_feature_presence, Summary, Day_start, Multi_day variants - Add P00 (has_summary) and P11 (override_events) predicates - Remove large commented-out icalendar/ptime type definitions - Refactor main.ml to group events by UID using a Map - Add get_y_m_d_from_timedesc helper to Utils
This commit is contained in:
@@ -24,6 +24,10 @@ let timedesc_of_date_or_datetime (t : date_or_datetime) : Timedesc.t =
|
||||
| `Date (year, month, day) ->
|
||||
Timedesc.make_exn ~year ~month ~day ~hour:0 ~minute:0 ~second:0 ~tz:(Timedesc.Time_zone.local_exn ()) ()
|
||||
|
||||
let get_y_m_d_from_timedesc (t : Timedesc.t) : int * int * int =
|
||||
let date = Timedesc.date t in
|
||||
(Timedesc.Date.year date, Timedesc.Date.month date, Timedesc.Date.day date)
|
||||
|
||||
let get_start ev =
|
||||
let _, start = ev.dtstart in
|
||||
timedesc_of_date_or_datetime start
|
||||
|
||||
Reference in New Issue
Block a user