Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ChronoUnit

Implements

Index

Properties

Static CENTURIES

CENTURIES: ChronoUnit = new ChronoUnit("Centuries", 31556952 * 100)

Unit that represents the concept of a century. For the ISO calendar system, it is equal to 100 years.

When used with other calendar systems it must correspond to an integral number of days and is normally an integral number of years.

since

1.0

Static DAYS

DAYS: ChronoUnit = new ChronoUnit("Days", 86400)

Unit that represents the concept of a day. For the ISO calendar system, it is the standard day from midnight to midnight. The estimated duration of a day is {@code 24 Hours}.

When used with other calendar systems it must correspond to the day defined by the rising and setting of the Sun on Earth. It is not required that days begin at midnight - when converting between calendar systems, the date should be equivalent at midday.

since

1.0

Static DECADES

DECADES: ChronoUnit = new ChronoUnit("Decades", 31556952 * 10)

Unit that represents the concept of a decade. For the ISO calendar system, it is equal to 10 years.

When used with other calendar systems it must correspond to an integral number of days and is normally an integral number of years.

since

1.0

Static ERAS

ERAS: ChronoUnit = new ChronoUnit("Eras", 31556952 * 1000000000)

Unit that represents the concept of an era. The ISO calendar system doesn't have eras thus it is impossible to add an era to a date or date-time. The estimated duration of the era is artificially defined as {@code 1,000,000,000 Years}.

When used with other calendar systems there are no restrictions on the unit.

since

1.0

Static FOREVER

FOREVER: ChronoUnit = new ChronoUnit("Forever", Number.MAX_VALUE)

Artificial unit that represents the concept of forever. This is primarily used with {@link TemporalField} to represent unbounded fields such as the year or era. The estimated duration of the era is artificially defined as the largest duration supported by {@code Duration}.

since

1.0

Static HALF_DAYS

HALF_DAYS: ChronoUnit = new ChronoUnit("HalfDays", 43200)

Unit that represents the concept of half a day, as used in AM/PM. For the ISO calendar system, it is equal to 12 hours.

since

1.0

Static HOURS

HOURS: ChronoUnit = new ChronoUnit("Hours", 3600)

Unit that represents the concept of an hour. For the ISO calendar system, it is equal to 60 minutes.

since

1.0

Static MICROS

MICROS: ChronoUnit = new ChronoUnit("Micros", 1 / 1000000)

Unit that represents the concept of a microsecond. For the ISO calendar system, it is equal to the 1,000,000th part of the second unit.

since

1.0

Static MILLENNIA

MILLENNIA: ChronoUnit = new ChronoUnit("Millennia", 31556952 * 1000)

Unit that represents the concept of a millennium. For the ISO calendar system, it is equal to 1000 years.

When used with other calendar systems it must correspond to an integral number of days and is normally an integral number of years.

since

1.0

Static MILLIS

MILLIS: ChronoUnit = new ChronoUnit("Millis", 1 / 1000)

Unit that represents the concept of a millisecond. For the ISO calendar system, it is equal to the 1000th part of the second unit.

since

1.0

Static MINUTES

MINUTES: ChronoUnit = new ChronoUnit("Minutes", 60)

Unit that represents the concept of a minute. For the ISO calendar system, it is equal to 60 seconds.

since

1.0

Static MONTHS

MONTHS: ChronoUnit = new ChronoUnit("Months", 31556952 / 12)

Unit that represents the concept of a month. For the ISO calendar system, the length of the month varies by month-of-year. The estimated duration of a month is one twelfth of {@code 365.2425 Days}.

When used with other calendar systems it must correspond to an integral number of days.

since

1.0

Static NANOS

NANOS: ChronoUnit = new ChronoUnit("Nanos", 1 / 1000000000)

Unit that represents the concept of a nanosecond, the smallest supported unit of time. For the ISO calendar system, it is equal to the 1,000,000,000th part of the second unit.

since

1.0

Static SECONDS

SECONDS: ChronoUnit = new ChronoUnit("Seconds", 1)

Unit that represents the concept of a second. For the ISO calendar system, it is equal to the second in the SI system of units, except around a leap-second.

since

1.0

Static WEEKS

WEEKS: ChronoUnit = new ChronoUnit("Weeks", 7 * 86400)

Unit that represents the concept of a week. For the ISO calendar system, it is equal to 7 days.

When used with other calendar systems it must correspond to an integral number of days.

since

1.0

Static YEARS

YEARS: ChronoUnit = new ChronoUnit("Years", 31556952)

Unit that represents the concept of a year. For the ISO calendar system, it is equal to 12 months. The estimated duration of a year is {@code 365.2425 Days}.

When used with other calendar systems it must correspond to an integral number of days or months roughly equal to a year defined by the passage of the Earth around the Sun.

since

1.0

Methods

getDuration

  • getDuration(): number

getName

  • getName(): string
  • Returns string