Hyperlinkv0.8.0-beta.28

Schema

Schema.isLessThanOrEqualToDateconsteffect/Schema.ts:7732
(
  maximum: globalThis.Date,
  annotations?: Annotations.Filter
): SchemaAST.Filter<globalThis.Date>

Validates that a Date is less than or equal to the specified date (inclusive).

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 a max constraint to ensure generated Date objects are less than or equal to the specified date.

Date checks
Source effect/Schema.ts:77329 lines
export const isLessThanOrEqualToDate = makeIsLessThanOrEqualTo({
  order: Order.Date,
  annotate: (maximum) => ({
    meta: {
      _tag: "isLessThanOrEqualToDate",
      maximum
    }
  })
})
Referenced by 1 symbols