リファレンス · 場所から見た太陽と月: 位置、日の出と日の入り、月の出入りと月相。suncalc 2 と同じ名前で、より正確です
MoonIllumination型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The Moon's illumination: the lit fraction 0 to 1, the phase 0 to 1 (0 new, 0.25 first quarter, 0.5 full, 0.75 last quarter), the position angle of the bright limb in degrees eastward from north, and whether it is waxing.
インポート
import type { MoonIllumination } from "@johnmorrisdotca/wakusei-planets/suncalc";
定義
interface MoonIllumination {
fraction: number;
phase: number;
angle: number;
waxing: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
fraction | number | |
phase | number | |
angle | number | |
waxing | boolean |
例
import { getMoonIllumination, type MoonIllumination } from "@johnmorrisdotca/wakusei-planets/suncalc";
const m: MoonIllumination = getMoonIllumination(new Date(Date.UTC(2026, 10, 24, 14)));
console.log(m.fraction >= 0 && m.fraction <= 1);true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。