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.property | string | Edge property name to filter on. |
spec.after | Date | string | number | Lower bound (inclusive). Accepts Date, ISO string, or ms timestamp. |
spec.before | Date | string | number | Upper bound (inclusive). Accepts Date, ISO string, or ms timestamp. |
spec.granularity | DateGranularity | Granularity hint for playback / UI alignment. |
spec.on | string | string[] | '*' | Restrict to a subset of edge relationships. Default: '*' (all). |
spec.includeNull | boolean | Keep edges missing the property. Default: true. |
spec.invert | boolean | Invert pass/fail. Default: false. |
spec.id | string | Override the auto-generated handle id. |
Returns: FilterHandle<DateRangeSpec>
Example
const recentLinks = api.filter.edges.dateRange({
property: "lastSeenAt",
after: "2024-01-01",
granularity: "day",
});