Skip to content

addMilliseconds ​

Adds a number of milliseconds to a TheDate.

Interactive example ​

Syntax ​

Classic signature ​

typescript
function addMilliseconds<
	GenericInput extends TheDate | SerializedTheDate, 
	GenericMillisecond extends number
>(
	input: GenericInput,
	millisecond: GenericMillisecond
): TheDate

Curried signature ​

typescript
function addMilliseconds<GenericInput extends TheDate | SerializedTheDate, GenericMillisecond extends number>(
	millisecond: GenericMillisecond
): (input: GenericInput) => TheDate

Parameters ​

  • millisecond: Number of milliseconds.
  • input: TheDate or SerializedTheDate.

Return value ​

A TheDate moved forward by the requested number of milliseconds.

See also ​

Released under the MIT license.