Skip to the content

Wakusei Planets惑星

The Sun, the planets and their moons as a clean line drawing, a shaded realistic drawing or a painted surface map, with real sizes, tilt and rotation, and the moons where they are at any date and time.

Wakusei is the Japanese word 惑星 for a planet. About the name

Contents

Reference · Julian dates (and the julian package's functions), calendars, time scales, sidereal time and Mars time

toJulianDatefunction

A time as a Julian date: the days since noon on 1 January 4713 BC (Julian calendar), as a number. A Date or milliseconds since 1970 in, the same scale out (UTC stays UTC). A number near today holds about a tenth of a millisecond; toJulianDay and toMillisecondsInJulianDay give the same instant with nothing lost.

Import it

import { toJulianDate } from "@johnmorrisdotca/wakusei-planets/time";

Definition

function toJulianDate(when: When): number

Parameters

NameTypeDescription
whenWhen

A Date or milliseconds since 1970.

Returns

number

The Julian date.

Examples

import { toJulianDate } from "@johnmorrisdotca/wakusei-planets/time";

console.log(toJulianDate(Date.UTC(2013, 10, 21, 10, 47, 2)).toFixed(6));
2456617.949329

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/wakusei-planets 0.24.0.