Skip to main content

resolve_temporal_range

Function resolve_temporal_range 

Source
pub fn resolve_temporal_range(
    query: &str,
    now: DateTime<Utc>,
) -> Option<TemporalRange>
Expand description

Resolve temporal keywords in query to a (after, before) datetime boundary pair.

Returns None when no specific range can be computed (the episodic path then falls back to FTS5 without a time filter, relying on temporal decay for recency boosting).

The now parameter is injectable for deterministic unit testing. Production callers should pass chrono::Utc::now().

All datetime strings are in SQLite format: YYYY-MM-DD HH:MM:SS (UTC).