UNPKG

vremel

Version:

JavaScript date utility library for Temporal API

13 lines 491 B
import { getConstructor } from "../type-utils.js"; /** * Returns the modified julian date of the exact time which the given temporal object represents. * * @param instant instant * @returns modified julian date */ export function modifiedJulianDate(instant) { const Instant = getConstructor(instant); // modified julian date epoch: 1858-11-17T00:00:00Z return instant.since(Instant.from("1858-11-17T00:00:00Z")).total("day"); } //# sourceMappingURL=modifiedJulianDate.js.map