ChronosChronos

subtract

Returns a new Chronos instance with the specified unit subtracted.

subtract()

Returns a new Chronos instance with the specified unit subtracted.

Signature

subtract(value: number, unit: TimeUnit): Chronos

Parameters

  • value: Number of units to subtract
  • unit: Time unit to subtract

Return Type

Chronos - New instance with subtracted time

Example

playground.ts

Info

Internally it uses add method such as new Chronos(...).add(-value, unit).

Last updated: Mon, Jun 15, 2026 06:37:26PM (UTC)

On this page