Skip to content

addSeconds ​

Adds a number of seconds to a TheDate.

Interactive example ​

Syntax ​

Classic signature ​

typescript
function addSeconds<
	GenericInput extends TheDate | SerializedTheDate, 
	GenericSecond extends number
>(
	input: GenericInput,
	second: GenericSecond
): TheDate

Curried signature ​

typescript
function addSeconds<GenericInput extends TheDate | SerializedTheDate, GenericSecond extends number>(
	second: GenericSecond
): (input: GenericInput) => TheDate

Parameters ​

  • second: Number of seconds.
  • input: TheDate or SerializedTheDate.

Return value ​

A TheDate moved forward by the requested number of seconds.

See also ​

Released under the MIT license.