A standard set of date periods units.

See java.time.temporial.ChronoUnit for full documentation

Hierarchy

  • ChronoUnit

Implements

Constructors

Properties

CENTURIES: ChronoUnit
DECADES: ChronoUnit
FOREVER: ChronoUnit
HALF_DAYS: ChronoUnit
HOURS: ChronoUnit
MICROS: ChronoUnit
MILLENNIA: ChronoUnit
MILLIS: ChronoUnit
MINUTES: ChronoUnit
MONTHS: ChronoUnit
NANOS: ChronoUnit
SECONDS: ChronoUnit
WEEKS: ChronoUnit
YEARS: ChronoUnit

Methods

  • Returns a copy of the specified temporal object with the specified period added.

    Type Parameters

    Parameters

    • temporal: R
    • amount: number

    Returns R

  • Calculates the amount of time between two temporal objects.

    Parameters

    Returns number

  • Checks if this unit represents a component of a date.

    Returns boolean

  • Checks if the duration of the unit is an estimate.

    Returns boolean

  • Checks if this unit is supported by the specified temporal object.

    Parameters

    Returns boolean

  • Checks if this unit represents a component of a time.

    Returns boolean

Generated using TypeDoc