Skip to content

betweenThanTime ​

Exclusive variant of betweenTime: checks that a TheTime lies between two bounds and excludes the endpoints.

Interactive example ​

Syntax ​

Standard signature ​

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

Curried signature ​

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

Parameters ​

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

Return value ​

true if the duration is within (greater, less).

See also ​

Released under the MIT license.