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 Sun and Moon from a place: position, sunrise and sunset, Moon rise, set and phase, with suncalc 2's names and a better engine

SunTimestype

The Sun's times for a day: each a Date or null when the Sun does not reach that height that day, solarNoon and nadir always there, and alwaysUp or alwaysDown when the Sun stays above or below the sunrise height all day.

Import it

import type { SunTimes } from "@johnmorrisdotca/wakusei-planets/suncalc";

Definition

type SunTimes = Record<SunTimeName, Date | null> & {
    solarNoon: Date;
    nadir: Date;
    alwaysUp?: boolean;
    alwaysDown?: boolean;
    [custom: string]: Date | boolean | null | undefined;
};

Members

NameTypeDescription
sunriseDate | null
sunsetDate | null
sunriseEndDate | null
sunsetStartDate | null
dawnDate | null
duskDate | null
nauticalDawnDate | null
nauticalDuskDate | null
nightEndDate | null
nightDate | null
goldenHourEndDate | null
goldenHourDate | null
solarNoonDate
nadirDate
alwaysUp (optional)boolean | undefined
alwaysDown (optional)boolean | undefined

Examples

import { getTimes, type SunTimes } from "@johnmorrisdotca/wakusei-planets/suncalc";

const t: SunTimes = getTimes(new Date(Date.UTC(2026, 5, 21, 12)), 51.5, -0.1);
console.log(t.sunrise instanceof Date, t.solarNoon instanceof Date);
true true

What it prints (run when this page was built)

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