fromJ2000Seconds
Signature
Section titled “Signature”fromJ2000Seconds(seconds: number, scale?: TimeScale): stringConvert seconds since J2000.0 on a time scale to a UTC instant string. The scale defaults to "TT", unlike the Julian Date and MJD functions, which default to "UTC": J2000.0 is defined as 2000-01-01T12:00:00 TT (IAU 1994 Resolution C7).
- The inverse of
toJ2000Seconds. The double is read exactly (days since 1970-01-01 are(seconds + 43 200) / 86 400 + 10 957), then rounded once to the nearest nanosecond, a half rounding up (Temporal’shalfExpand). - On
"UTC"the count is ERFA’s quasi-JD: on a day with a leap second the 86 401 s fill 86 400, so a fraction near the end of that day reads as…T23:59:60Z. TDB is not available. - Precision: a double near 2026 resolves only to 2⁻²³ s (about 0.12 µs), so a round trip of
toJ2000Secondscan be off by tens of nanoseconds:820497669.184on TT gives2026-01-01T00:00:00.000000015Z. UsefromJulianDatePartsfor nanosecond exactness. - Returns
"Z"form with Temporal’s shortest fraction. secondsmust be a finite number;NaN,±Infinity, a bigint or a string gives "".- Domain: 1972-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z UTC; "" outside it.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
seconds | number | seconds since J2000.0 on the scale |
scale | TimeScale | the time scale the count is on, default "TT" |
Returns
Section titled “Returns”ISO 8601 UTC instant string (Z), or "" on invalid input, an unknown scale or a value outside the domain
Related types
Section titled “Related types”Examples
Section titled “Examples”import { fromJ2000Seconds } from "@northguild/gmt/timescale/convert";
fromJ2000Seconds(0) // "2000-01-01T11:58:55.816Z"Source
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.