Skip to content

subtractSeconds ​

Subtracts a number of seconds from a TheDate.

Interactive example ​

Syntax ​

Classic signature ​

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

Curried signature ​

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

Parameters ​

  • second: Seconds to remove.
  • input: TheDate or SerializedTheDate.

Return value ​

A TheDate moved back by the given number of seconds.

See also ​

Released under the MIT license.