Skip to main content

RelativeDateTimeValue

Defined in: types.ts:96

Structured representation of a relative date/time value, e.g. "three months ago" or "the beginning of this year". Stored as the value of a rule (in place of the usual ISO 8601 string) and recognized by the date/time rule processors.

The final date/time is computed as: apply the anchor to the current date/time, then add offset units of unit. When offset is 0, unit is irrelevant.

Properties

anchor

anchor: RelativeDateTimeAnchor

Defined in: types.ts:100

Zero-offset reference point.


mode

mode: "relative"

Defined in: types.ts:98

Discriminant identifying a relative (as opposed to absolute) value.


offset

offset: number

Defined in: types.ts:102

Signed offset from the anchor; negative = past, positive = future, 0 = exact anchor.


unit

unit: RelativeDateTimeUnit

Defined in: types.ts:104

Unit of the offset.


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.