リファレンス · 場所から見た太陽と月: 位置、日の出と日の入り、月の出入りと月相。suncalc 2 と同じ名前で、より正確です
getMoonIllumination関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The Moon's phase.
インポート
import { getMoonIllumination } from "@johnmorrisdotca/wakusei-planets/suncalc";
定義
function getMoonIllumination(date?: Date | number): MoonIllumination
引数
| 名前 | 型 | 説明 |
|---|---|---|
date (省略可) | number | Date | The moment, as a |
戻り値
MoonIllumination
The lit fraction, the phase, the bright limb's position angle in degrees and whether it is waxing.
例
import { getMoonIllumination } from "@johnmorrisdotca/wakusei-planets/suncalc";
const { fraction, waxing } = getMoonIllumination(new Date(Date.UTC(2026, 10, 24, 14)));
console.log(fraction.toFixed(2), waxing);1.00 true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。