Date filters
DateRangeFilter
Filters by comparing a field to a range of date values.
Property | Type | Description |
---|---|---|
operator | RangeOperators | The operator to apply to the filter value |
value | Range object (described below) | The value to use for the filter operation |
Range object:
Property | Type | Description |
---|---|---|
min | isoDate or utcDateTime or offsetDateTime | The minimum date value for this range |
max | isoDate or utcDateTime or offsetDateTime | The maximum date value for this range |
$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 required: - min - max examples: - min: 2021-01-01 max: 2021-01-02 description: The value to use for the filter operationrequired: - operator - valuedescription: Filters by comparing a field to a range of date values
/** Filters by comparing a field to a range of date values */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; };}
{ "operator": "between", "value": { "min": "2021-01-01", "max": "2021-01-02" }}
DateComparisonFilter
Filters by comparing a field to a date value.
Property | Type | Description |
---|---|---|
operator | ComparisonOperators | The operator to apply to the filter value |
value | isoDate or utcDateTime or offsetDateTime | The value to use for the filter operation |
$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 description: The value to use for the filter operationrequired: - operator - valuedescription: Filters by comparing a field to a date value
/** Filters by comparing a field to a date value */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;}
{ "operator": "eq", "value": "2021-01-01"}