リファレンス · 同じものを suncalc 1 の約束 (ラジアン、南からの方位) で
getMoonTimes関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { getMoonTimes } from "@johnmorrisdotca/wakusei-planets/suncalc/legacy";
定義
function getMoonTimes(date: Date | number, lat: number, lng: number, inUTC?: boolean): LegacyMoonTimes
引数
| 名前 | 型 | 説明 |
|---|---|---|
date | number | Date | Any moment of the day. |
lat | number | Degrees north. |
lng | number | Degrees east. |
inUTC (省略可) | boolean | Search the UTC day instead of the local one. |
戻り値
LegacyMoonTimes
rise and set when they happen, and alwaysUp or alwaysDown when the Moon stays up or down.
例
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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。