Classify an age-in-minutes reading against fixed freshness thresholds.

Data Freshness Report

data_freshness.js
const ageMinutes = 18;
const maxAge = 30;
let freshness = "stale";

if (ageMinutes <= 10) {
    freshness = "fresh";
} else if (ageMinutes <= maxAge) {
    freshness = "aging";
}

console.log(`age=${ageMinutes} max=${maxAge} status=${freshness}`);
data freshness Freshness reports avoid live clocks by using a fixed age signal and deterministic thresholds.