Reference · The same, with suncalc 1's conventions (radians, azimuth from south)
LegacyMoonTimestype
The Moon's rise and set; alwaysUp or alwaysDown is true when the Moon never rises or sets in the day.
Import it
import type { LegacyMoonTimes } from "@johnmorrisdotca/wakusei-planets/suncalc/legacy";
Definition
interface LegacyMoonTimes {
rise?: Date;
set?: Date;
alwaysUp?: boolean;
alwaysDown?: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
rise (optional) | Date | undefined | |
set (optional) | Date | undefined | |
alwaysUp (optional) | boolean | undefined | |
alwaysDown (optional) | boolean | undefined |
Examples
import { getMoonTimes, type LegacyMoonTimes } from "@johnmorrisdotca/wakusei-planets/suncalc/legacy";
const t: LegacyMoonTimes = getMoonTimes(new Date(Date.UTC(2026, 10, 7, 12)), 35.7, 139.7, true);
console.log(t.rise === undefined || t.rise instanceof Date);trueWhat it prints (run when this page was built)