(
options: {
readonly minimum: globalThis.Date
readonly maximum: globalThis.Date
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
},
annotations?: Annotations.Filter
): SchemaAST.Filter<globalThis.Date>Validates that a Date is within a specified range. The range boundaries can be inclusive or exclusive based on the provided options.
Details
JSON Schema:
This check does not have a direct JSON Schema equivalent, as JSON Schema validates date strings, not Date objects.
Arbitrary:
When generating test data with fast-check, this applies min and max
constraints to ensure generated Date objects fall within the specified range,
shifting exclusive bounds by one millisecond.
export const const isBetweenDate: (
options: {
readonly minimum: unknown
readonly maximum: unknown
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
},
annotations?: Annotations.Filter
) => SchemaAST.Filter<unknown>
Validates that a Date is within a specified range. The range boundaries can
be inclusive or exclusive based on the provided options.
Details
JSON Schema:
This check does not have a direct JSON Schema equivalent, as JSON Schema
validates date strings, not Date objects.
Arbitrary:
When generating test data with fast-check, this applies min and max
constraints to ensure generated Date objects fall within the specified range,
shifting exclusive bounds by one millisecond.
isBetweenDate = function makeIsBetween<T>(deriveOptions: {
readonly order: Order.Order<T>
readonly annotate?:
| ((options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
}) => Annotations.Filter)
| undefined
readonly formatter?: Formatter<T> | undefined
}): (
options: {
readonly minimum: T
readonly maximum: T
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
},
annotations?: Annotations.Filter
) => SchemaAST.Filter<T>
Creates an inclusive or exclusive range check for any ordered type from an
Order.Order instance.
makeIsBetween({
order: Order.Order<globalThis.Date>order: import OrderOrder.Date,
annotate?: | ((options: {
readonly minimum: unknown
readonly maximum: unknown
readonly exclusiveMinimum?:
| boolean
| undefined
readonly exclusiveMaximum?:
| boolean
| undefined
}) => Annotations.Filter)
| undefined
annotate: (options: {
readonly minimum: unknown
readonly maximum: unknown
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options) => ({
Annotations.Filter.meta?: Annotations.Meta | undefined(property) Annotations.Filter.meta?: {
minimum: globalThis.Date;
maximum: globalThis.Date;
exclusiveMinimum: boolean | undefined;
exclusiveMaximum: boolean | undefined;
_tag: 'isBetweenDate';
}
Optional metadata used to identify or extend the filter with custom data.
meta: {
_tag: "isBetweenDate"_tag: "isBetweenDate",
...options: {
readonly minimum: unknown
readonly maximum: unknown
readonly exclusiveMinimum?: boolean | undefined
readonly exclusiveMaximum?: boolean | undefined
}
options
}
})
})