Skip to content

addMinutes

Adds a positive number of minutes to a TheDate.

Interactive example

Syntax

Classic signature

typescript
function addMinutes<
	GenericInput extends TheDate, 
	GenericMinute extends number
>(
	input: GenericInput,
	minute: PositiveNumber<GenericMinute>
): TheDate

Curried signature

typescript
function addMinutes<GenericInput extends TheDate, GenericMinute extends number>(
	minute: PositiveNumber<GenericMinute>
): (input: GenericInput) => TheDate

Parameters

  • minute: Strictly positive number of minutes.
  • input: TheDate to update.

Return value

A TheDate moved forward by the requested number of minutes.

See also

Released under the MIT license.