toDatefunction
The Date of a Julian date (a number, or the string julian gives), rounded to the millisecond.
Import it
import { toDate } from "@johnmorrisdotca/wakusei-planets/time";
Definition
function toDate(jd: number | string): Date
Parameters
| Name | Type | Description |
|---|---|---|
jd | string | number | The Julian date. |
Returns
Date
A Date.
Examples
import { toDate } from "@johnmorrisdotca/wakusei-planets/time";
console.log(toDate("2456617.949335").toISOString());2013-11-21T10:47:02.544ZWhat it prints (run when this page was built)