toTAI
Signature
Section titled “Signature”toTAI(isoString: string): stringConvert a UTC instant to a TAI time-scale string, YYYY-MM-DDTHH:MM:SS[.fraction] TAI.
- TAI = UTC + (TAI − UTC), from the IERS leap-second table built into GMT (Leap_Second.dat through Bulletin C 72, 6 July 2026). The table is closed: the CGPM decided in 2026 that UTC becomes continuous on 20 May 2027, so after the last insertion (2016-12-31) TAI − UTC stays 37 s.
- An inserted leap second maps to its own TAI second:
2016-12-31T23:59:60Zis2017-01-01T00:00:36 TAI. A second 60 on any other day returns "". - Accepts any offset or bracketed zone
toNanosecondsaccepts; TAI has no zone. TAIis the FITS time-scale token. No other GMT function reads the string;fromTAIdoes.- "" before 1972-01-01, for a result past year 9999, and on invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
isoString | string | ISO 8601 instant string |
Returns
Section titled “Returns”the TAI time-scale string, or "" on invalid input, a date before 1972, or a TAI result past year 9999
Examples
Section titled “Examples”import { toTAI } from "@northguild/gmt/timescale/convert";
toTAI("2026-01-01T00:00:00Z") // "2026-01-01T00:00:37 TAI"Source
Section titled “Source”Accessibility
© 2026 NorthGuild · Licences
Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.