toTai64n
Signature
Section titled “Signature”toTai64n(isoString: string): stringConvert a UTC instant to its TAI64N label in the daemontools text form, @ and 24 lowercase hex digits.
- The label is TAI: 8 bytes of 2^62 + TAI seconds since 1970-01-01T00:00:00 TAI, then 4 bytes of nanoseconds (Bernstein, TAI64 § TAI64N), printed as daemontools
tai64nprints it. - 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 second has its own label:
2016-12-31T23:59:60Zis@40000000586846a400000000. A second 60 on any other day returns "". - Every nanosecond Temporal holds is kept; the label never has attoseconds.
- Accepts any offset or bracketed zone
toTAIaccepts. - daemontools
tai64nassumes the system clock counts TAI seconds since 1970-01-01 00:00:10 TAI (https://cr.yp.to/daemontools/tai64n.html): on a POSIX UTC clock its label is (TAI − UTC) − 10 = 27 s below this one from 2017 on, andfromTai64nreads it 27 s early. - "" before 1972-01-01, after 9999-12-31T23:59:59.999999999Z, and on invalid input.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
isoString | string | ISO 8601 instant string |
Returns
Section titled “Returns”the TAI64N label, or "" on invalid input, a date before 1972, or after year 9999
Examples
Section titled “Examples”import { toTai64n } from "@northguild/gmt/timescale/convert";
toTai64n("1992-06-02T08:06:43Z") // "@400000002a2b2c2d00000000" — Bernstein's exampleSource
Section titled “Source”© 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.