Skip to content

lessThanTime

Checks whether a TheTime is strictly less than a threshold.

Interactive example

Syntax

Standard signature

typescript
function lessThanTime<
	GenericInput extends TheTime | SerializedTheTime
>(
	input: GenericInput,
	threshold: TheTime | SerializedTheTime
): boolean

Curried signature

typescript
function lessThanTime<
	GenericInput extends TheTime | SerializedTheTime
>(
	threshold: TheTime | SerializedTheTime
): (input: GenericInput) => boolean

Parameters

  • threshold: Duration limit.
  • input: TheTime or SerializedTheTime.

Return value

true if input is strictly less than the threshold.

See also

Released under the MIT license.