Skip to content

lessTime

The lessTime() function checks if a TheTime is less than or equal to a threshold.

Interactive example

Syntax

Standard signature

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

Curried signature

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

Parameters

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

Return value

true if input is less than or equal to the threshold.

See also

Released under the MIT license.