Documentation / @interstellar-tools/temporal / SECONDS_PER
Variable: SECONDS_PER
ts
const SECONDS_PER: Readonly<Record<TemporalUnitType, number>>;Defined in: convert-temporal-unit.ts:37
Seconds-per-unit lookup for all canonical TemporalUnitType symbols.
Conventions
- Base: conversions are performed via seconds.
- SI day:
d = 86 400 s(from SECONDS_PER_DAY). - Julian year:
yr = 365.25 d = 31 557 600 s(from JULIAN_YEAR_SECONDS);kyr/Myr/Gyrare powers of 10 thereof. - Units are canonical and case-sensitive (e.g.,
'μs'uses the Unicode micro sign). - The table is frozen: it can be read, but not changed at runtime.
Example
ts
// seconds per hour:
SECONDS_PER.h; // 3600
// seconds in a Julian year:
SECONDS_PER.yr; // 31_557_600