Options
All
  • Public
  • Public/Protected
  • All
Menu

The chrono unit dateline model is a specialization of the dateline model that works in combination with the ChronoUnit. The chrono unit basically represents standard calendar units ranging from milliseconds to thousands of years.

since

1.0

Hierarchy

Index

Constructors

constructor

  • Constructs a new dateline model with a long list of predefined resolutions of type ChronoUnitResolution.

    since

    1.0

    Returns ChronoUnitDatelineModel

Methods

addResolution

addZoneId

  • addZoneId(zoneId: string): void
  • Adds a ZoneId to the model.

    since

    1.0

    Parameters

    • zoneId: string

      the zone ID to add

    Returns void

clearResolutions

  • clearResolutions(temporalUnit?: ChronoUnit): void
  • Removes all resolutions for the given temporal unit.

    since

    1.0

    Parameters

    • Optional temporalUnit: ChronoUnit

      the temporal unit for which to remove all resolutions

    Returns void

getAvailableZoneIds

  • getAvailableZoneIds(): Set<string>
  • Returns all ZoneId instances that are available for the user to switch to.

    since

    1.0

    Returns Set<string>

    the available zone IDs

getMaxScaleCount

  • getMaxScaleCount(): number
  • Returns the maximum scale count.

    since

    1.0

    Returns number

    the maximum scale count

getMinScaleCount

  • getMinScaleCount(): number
  • Returns the minimum scale count.

    since

    1.0

    Returns number

    the minimum scale count

getResolutions

  • Returns all resolutions that are available for the given temporal unit.

    since

    1.0

    Parameters

    • temporalUnit: ChronoUnit

      the temporal unit for which resolutions are looked up

    Returns Resolution<ChronoUnit>[]

    the available resolutions for the given temporal unit

getScaleCount

  • getScaleCount(): number
  • Returns the number of currently visible scales.

    since

    1.0

    Returns number

    the scale count

getTemporalUnits

  • Returns all temporal units that are being used by the model.

    since

    1.0

    Returns ChronoUnit[]

    the list of temporal units used by the model

nextTemporalUnit

  • Returns the next larger temporal unit for the given temporal unit, e.g. when passing ChronoUnit.HOURS this method might return ChronoUnit.DAYS.

    since

    1.0

    Parameters

    • unit: ChronoUnit

      the unit for which to return the next higher unit

    Returns ChronoUnit

    the next higher temporal unit

removeResolution

setMaxScaleCount

  • setMaxScaleCount(count: number): void
  • Sets the maximum scale count.

    since

    1.0

    Parameters

    • count: number

      the new maximum scale count

    Returns void

setMinScaleCount

  • setMinScaleCount(count: number): void
  • Sets the minimum scale count.

    since

    1.0

    Parameters

    • count: number

      the new minimum scale count

    Returns void

setScaleCount

  • setScaleCount(count: number): void
  • Sets the number of currently visible scales.

    since

    1.0

    Parameters

    • count: number

      the new scale count

    Returns void