Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TimeUnit

Hierarchy

Index

Constructors

constructor

Properties

Readonly Static HOUR

HOUR: TimeUnit = ...

Readonly Static MICROSECOND

MICROSECOND: TimeUnit = ...

Readonly Static MILLISECOND

MILLISECOND: TimeUnit = ...

Readonly Static MINUTE

MINUTE: TimeUnit = ...

Readonly Static NANOSECOND

NANOSECOND: TimeUnit = ...

Readonly Static SECOND

SECOND: TimeUnit = ...

Protected Readonly Static UNITS

UNITS: Map<string, Unit> = ...

Protected Readonly Static UNIT_BASES

UNIT_BASES: Map<string, string> = ...

Accessors

aliases

  • get aliases(): string[]

baseName

  • get baseName(): string

definitions

name

  • get name(): string
  • set name(name: string): void

prefixType

Protected prefixes

Methods

convert

  • convert<T>(value: T, target: string | Unit): T
  • Convert a value in the current unit to a target unit

    Type parameters

    Parameters

    • value: T

      Value to convert

    • target: string | Unit

      Target unit

    Returns T

    Converted unit

createBaseDefinition

createDefinition

Protected findByName

  • findByName(name: string): Unit

specifier

Static convert

Static findByName

  • findByName(name: string, baseName?: string): Unit

Static registerUnit

  • registerUnit(unit: Unit, override?: boolean): Unit