fromJulianDateParts
Signature
Section titled “Signature”fromJulianDateParts(parts: JulianDateParts, scale?: TimeScale): stringConvert a two-part Julian Date on a time scale to a UTC instant string. The scale defaults to "UTC".
- The inverse of
toJulianDateParts. The two doubles are read exactly and summed exactly (jd1 + jd2 − 2440587.5days since 1970-01-01), then rounded to the nearest nanosecond, a half rounding up (Temporal’shalfExpand). On"UTC","TAI"and"TT"that rounds the instant. On"TCG"it rounds the TCG label, whichfromTCGthen maps to UTC (flooring to the TT nanosecond), so the result can be 1 ns later than the exact inverse of the date. The round trip withtoJulianDatePartsstays exact. - Any split works (ERFA
jd2cal.cNote 2):{2451545, 0},{2400000.5, 51544.5},{0, 2451545}and{2451545.5, -0.5}give the same instant, though a split that puts everything into one part has already lost precision in that double. - JD days begin at noon:
{ jd1: 2451544, jd2: 0.5 }is midnight UTC. - On
"UTC"the count is ERFA’s quasi-JD: a day with a leap second counts as one day, so a fraction past the end of an ordinary day reads as…T23:59:60Zon a leap-second day. On"TAI","TT"and"TCG"it is a true JD. TDB is not available. - Returns
"Z"form with Temporal’s shortest fraction, and…:60inside an inserted second. - Both members must be finite numbers; a bigint, a numeric string,
NaNor a missing member gives "". - Domain: 1972-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z UTC; "" outside it.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
parts | JulianDateParts | the two-part Julian Date |
scale | TimeScale | the time scale the date is counted on, default "UTC" |
Returns
Section titled “Returns”ISO 8601 UTC instant string (Z), or "" on invalid input, an unknown scale or a date outside the domain
Related types
Section titled “Related types”Examples
Section titled “Examples”import { fromJulianDateParts } from "@northguild/gmt/timescale/convert";
fromJulianDateParts({ jd1: 2451545, jd2: 0 }) // "2000-01-01T12:00:00Z"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.