Skip to content

fromJulianDate

  • The core functions, which every industry uses.
fromJulianDate(jd: number, scale?: TimeScale): string

Convert a single Julian Date on a time scale to a UTC instant string. The scale defaults to "UTC".

  • The inverse of toJulianDate. The double is read exactly (jd − 2440587.5 days since 1970-01-01) and rounded once to the nearest nanosecond, a half rounding up (Temporal’s halfExpand), so the only loss is the one already in jd: a double near JD 2 460 000 is spaced about 40 µs apart. For nanosecond precision use fromJulianDateParts.
  • JD days begin at noon: 2451544.5 is midnight UTC.
  • On "UTC" the count is ERFA’s quasi-JD, the same as toJulianDateParts: a day with a leap second counts as one day. On "TAI", "TT" and "TCG" it is a true JD. TDB is not available.
  • Returns "Z" form with Temporal’s shortest fraction, and …:60 inside an inserted second.
  • jd must be a finite number; a bigint, a numeric string, NaN or Infinity gives "".
  • Domain: 1972-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z UTC; "" outside it.
ParameterTypeDescription
jdnumberthe Julian Date
scaleTimeScalethe time scale the date is counted on, default "UTC"

ISO 8601 UTC instant string (Z), or "" on invalid input, an unknown scale or a date outside the domain

import { fromJulianDate } from "@northguild/gmt/timescale/convert";
fromJulianDate(2451545) // "2000-01-01T12:00:00Z"
output 

timescale/convert/fromJulianDate.ts

© 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.