db.ago
A timestamp a given duration before now.
db.ago(durationMs) → number
Returns the timestamp a given duration before now (now minus the span). Feed it a duration helper, or a sum of them, to filter for rows older than a window.
Parameters
durationMs
number
RequiredA span in milliseconds, usually from the duration helpers.
Older than a window
const stale = await Invoices .filter((i) => i.updated_at < db.ago(db.days(30)));