Skip to content

lessThan

Checks that a TheDate is less than or equal to a threshold.

Interactive example

Syntax

Classic signature

typescript
function lessThan<
	GenericInput extends TheDate
>(
	input: GenericInput,
	threshold: TheDate
): boolean

Curried signature

typescript
function lessThan<
	GenericInput extends TheDate
>(
	threshold: TheDate
): (input: GenericInput) => boolean

Parameters

  • threshold: Limit date.
  • input: Date to compare.

Return value

true if input is before or equal to the threshold.

See also

Released under the MIT license.