Whentype
A moment: a Date or a number of milliseconds since 1970 (UTC, as JavaScript counts).
Import it
import type { When } from "@johnmorrisdotca/wakusei-planets/time";
Also exported from: @johnmorrisdotca/wakusei-planets/spacecraft
Definition
type When = Date | number;
Examples
import { toJulianDate, type When } from "@johnmorrisdotca/wakusei-planets/time";
const when: When = new Date(Date.UTC(2000, 0, 1, 12));
console.log(toJulianDate(when) === toJulianDate(when.getTime()));trueWhat it prints (run when this page was built)