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 · The same, with suncalc 1's conventions (radians, azimuth from south)

getMoonTimesfunction

The Moon's rise and set over the 24 hours from midnight of the moment's day, in the machine's zone or, with inUTC, in UTC.

Import it

import { getMoonTimes } from "@johnmorrisdotca/wakusei-planets/suncalc/legacy";

Definition

function getMoonTimes(date: Date | number, lat: number, lng: number, inUTC?: boolean): LegacyMoonTimes

Parameters

NameTypeDescription
datenumber | Date

Any moment of the day.

latnumber

Degrees north.

lngnumber

Degrees east.

inUTC (optional)boolean

Search the UTC day instead of the local one.

Returns

LegacyMoonTimes

rise and set when they happen, and alwaysUp or alwaysDown when the Moon stays up or down.

Examples

import { getMoonTimes } from "@johnmorrisdotca/wakusei-planets/suncalc/legacy";

const t = getMoonTimes(new Date(Date.UTC(2026, 10, 7, 12)), 35.7, 139.7, true);
console.log(t.rise === undefined || t.rise instanceof Date);
true

What it prints (run when this page was built)

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