Skip to main content

recency

Function recency 

Source
pub fn recency(
    timestamp: DateTime<Utc>,
    now: DateTime<Utc>,
    half_life_days: f64,
) -> f64
Expand description

Exponential decay with a half-life, in (0, 1]. A record from the future (clock skew) scores 1.0 rather than exploding.