# `ExDav.ICal`
[🔗](https://git.sr.ht/~sbr/ExDav)

Tiny iCalendar helpers — just enough to extract the UID and primary
component (VEVENT vs VTODO) from an iCalendar object and to compute
an ETag from its serialized form.

# `etag`

```elixir
@spec etag(binary()) :: String.t()
```

# `overlaps_range?`

```elixir
@spec overlaps_range?(String.t(), DateTime.t(), DateTime.t()) :: boolean()
```

Returns `true` if the iCalendar object overlaps the given time range
`[range_start, range_end)` (both `DateTime.t/0`).

Uses a deliberately permissive interpretation: we extract the first
`DTSTART` and `DTEND`/`DUE` and treat them as UTC instants regardless
of `TZID`. Recurring events (RRULE) are not expanded — we test only
the master instance, which is good enough for the minimal server.

# `parse_ical_datetime`

Parse a CalDAV `time-range` start/end attribute (basic ISO 8601 form
used by CalDAV: `YYYYMMDDTHHMMSSZ`) or an iCalendar property value into
a `DateTime`. Returns `nil` on failure.

# `summarize`

```elixir
@spec summarize(String.t()) :: {String.t() | nil, String.t() | nil}
```

Returns `{uid_or_nil, component_or_nil}` for the first inner component
(VEVENT or VTODO) found in the iCalendar text.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
