ChronosChronos

next

Returns a new Chronos instance advanced by the specified time unit.

next()

Returns a new Chronos instance advanced by the specified time unit.

Signature

next(unit?: TimeUnit): Chronos

Parameters

ParameterTypeDefaultDescription
unitTimeUnit'day'The time unit to advance by.

Return Value

Returns a new Chronos instance advanced by the specified unit.

Behavior

Advances the date/time by exactly the specified unit while preserving other components whenever possible.

Notes

  • Returns a new immutable instance.
  • Equivalent to add(1, unit).
  • Preserves the existing time components whenever possible.
  • Handles month and year overflow automatically.

Example

playground.ts

Last updated: Fri, Jun 19, 2026 07:09:51PM (UTC)

On this page