Date filters
Filters that compare a field to a date or date range.
DateComparisonFilter
Section titled “DateComparisonFilter”Filters by comparing a field to a date value.
| Property | Type | Required | Description |
|---|---|---|---|
operator | ComparisonOperators | Yes | The operator to apply to the filter value. |
value | isoDate | string | string | Yes | The value to use for the filter operation. |
{ "operator": "gt", "value": "2021-01-01"}$schema: https://json-schema.org/draft/2020-12/schema$id: DateComparisonFilter.yamltype: objectproperties: operator: $ref: ComparisonOperators.yaml description: The operator to apply to the filter value. value: anyOf: - $ref: isoDate.yaml - type: string format: date-time - type: string format: date-time examples: - 2021-01-01 description: The value to use for the filter operation.required: - operator - valuedescription: Filters by comparing a field to a date value./** Filters by comparing a field to a date value. */@Versioning.added(Versions.v0_1)model DateComparisonFilter { /** The operator to apply to the filter value. */ operator: ComparisonOperators;
/** The value to use for the filter operation. */ @example(Types.isoDate.fromISO("2021-01-01")) value: Types.isoDate | utcDateTime | offsetDateTime;}DateRangeFilter
Section titled “DateRangeFilter”Filters by comparing a field to a range of date values.
| Property | Type | Required | Description |
|---|---|---|---|
operator | RangeOperators | Yes | The operator to apply to the filter value. |
value | object | Yes | The value to use for the filter operation. |
{ "operator": "between", "value": { "min": "2021-01-01", "max": "2021-01-02" }}$schema: https://json-schema.org/draft/2020-12/schema$id: DateRangeFilter.yamltype: objectproperties: operator: $ref: RangeOperators.yaml description: The operator to apply to the filter value. value: type: object properties: min: anyOf: - $ref: isoDate.yaml - type: string format: date-time - type: string format: date-time max: anyOf: - $ref: isoDate.yaml - type: string format: date-time - type: string format: date-time required: - min - max examples: - min: 2021-01-01 max: 2021-01-02 description: The value to use for the filter operation.required: - operator - valuedescription: Filters by comparing a field to a range of date values./** Filters by comparing a field to a range of date values. */@Versioning.added(Versions.v0_1)model DateRangeFilter { /** The operator to apply to the filter value. */ operator: RangeOperators;
/** The value to use for the filter operation. */ @example(#{ min: Types.isoDate.fromISO("2021-01-01"), max: Types.isoDate.fromISO("2021-01-02") }) value: { min: Types.isoDate | utcDateTime | offsetDateTime; max: Types.isoDate | utcDateTime | offsetDateTime; };}