Skip to main content

format_dated_context

Function format_dated_context 

Source
pub fn format_dated_context(
    facts: &[Recollection],
    date_field: &str,
) -> DatedContext
Expand description

Render facts as a DatedContext, reading each fact’s date from the date_field metadata key (a YYYYMMDD integer).

Facts are split into dated (sorted oldest-first) and undated (kept in the order given, i.e. by relevance), then rendered one per line. now is the latest date seen. An empty facts yields an empty timeline and now: None.