Skip to content

Documentation / @interstellar-tools/temporal

@interstellar-tools/temporal ​

Time and epoch utilities for space applications, from attoseconds to gigayears, with unit normalisation and conversion that the rest of the stack builds on.

Documentation ​

The full documentation lives at phun-ky.net/interstellar-tools:

Installation ​

npm
shell
npm i --save @interstellar-tools/temporal

Variables ​

VariableDescription
NORMALIZE_TEMPORAL_UNITLookup table that normalizes user-facing time unit aliases (and the canonical symbols themselves) to a single, canonical TemporalUnitType.
SECONDS_PERSeconds-per-unit lookup for all canonical TemporalUnitType symbols.

Functions ​

FunctionDescription
convertTemporalUnitConvert a temporal duration between any two canonical TemporalUnitType units.
normalizeTemporalUnitNormalize a user-provided temporal unit string into a canonical TemporalUnitType.