Skip to content

betweenTime ​

Checks that a TheTime is in an inclusive range between two bounds (greater then less).

Interactive example ​

Syntax ​

Standard signature ​

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

Curried signature ​

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

Parameters ​

  • greater: Lower bound (inclusive).
  • less: Upper bound (inclusive).
  • input: TheTime or SerializedTheTime.

Return value ​

true if the input is inside an inclusive range between the bounds.

See also ​

Released under the MIT license.