libera_utils.l1a.day_coverage.overlaps_day_window#

libera_utils.l1a.day_coverage.overlaps_day_window(start: datetime, end: datetime, *, day: date) → bool#

Return True if the closed span [start, end] touches the closed day window of day.

The window is the one trim_l1a_to_day_window() keeps.

Parameters:
  • start (datetime) – Span endpoints, timezone-aware.

  • end (datetime) – Span endpoints, timezone-aware.

  • day (datetime.date) – Applicable UTC calendar day.

Returns:

Whether the span and the window share at least one instant.

Return type:

bool

Raises:

TypeError – If start or end is timezone-naive.