Skip to content

between

Checks that a TheDate is strictly between two bounds (greater then less).

Interactive example

Syntax

Classic signature

typescript
function between<
	GenericInput extends TheDate
>(
	input: GenericInput,
	greater: TheDate,
	less: TheDate
): boolean

Curried signature

typescript
function between<
	GenericInput extends TheDate
>(
	greater: TheDate,
	less: TheDate
): (input: GenericInput) => boolean

Parameters

  • greater: Lower bound (exclusive).
  • less: Upper bound (exclusive).
  • input: Date to test.

Return value

true if the input lies strictly between the two bounds.

See also

Released under the MIT license.