Skip to content

betweenTime

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

Interactive example

Syntax

Standard signature

typescript
function betweenTime<
	GenericInput extends TheTime
>(
	input: GenericInput,
	greater: TheTime,
	less: TheTime
): boolean

Curried signature

typescript
function betweenTime<
	GenericInput extends TheTime
>(
	greater: TheTime,
	less: TheTime
): (input: GenericInput) => boolean

Parameters

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

Return value

true if the input is strictly between the bounds.

See also

Released under the MIT license.