Hyperlinkv0.8.0-beta.28

Schema

Schema.isBetweenDateconsteffect/Schema.ts:7762
(
  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.

Date checks
Source effect/Schema.ts:77629 lines
export const isBetweenDate = makeIsBetween({
  order: Order.Date,
  annotate: (options) => ({
    meta: {
      _tag: "isBetweenDate",
      ...options
    }
  })
})
Referenced by 1 symbols