filteredges

filter.edges.dateRange

dateRange(spec: DateRangeSpec): FilterHandle<DateRangeSpec>

Date range filter on an edge property.

Hides edges whose property value falls outside [after, before]. Accepts Date, ISO string, or millisecond timestamp inputs; the entry stores millisecond timestamps. Omitted bounds default to -Infinity / +Infinity. Invalid date strings fall back to the open bound. granularity is forwarded for downstream playback / UI alignment.

spec.propertystringEdge property name to filter on.
spec.after Date | string | numberLower bound (inclusive). Accepts Date, ISO string, or ms timestamp.
spec.before Date | string | numberUpper bound (inclusive). Accepts Date, ISO string, or ms timestamp.
spec.granularity DateGranularityGranularity hint for playback / UI alignment.
spec.on string | string[] | '*'Restrict to a subset of edge relationships. Default: '*' (all).
spec.includeNull booleanKeep edges missing the property. Default: true.
spec.invert booleanInvert pass/fail. Default: false.
spec.id stringOverride the auto-generated handle id.

Returns: FilterHandle<DateRangeSpec>

Example

const recentLinks = api.filter.edges.dateRange({
  property: "lastSeenAt",
  after: "2024-01-01",
  granularity: "day",
});