Skip to content

lessThan

Checks that a TheDate is strictly less than a threshold.

Interactive example

Syntax

Classic signature

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

Curried signature

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

Parameters

  • threshold: Limit date.
  • input: TheDate or SerializedTheDate.

Return value

true if input is strictly before the threshold.

See also

Released under the MIT license.