リファレンス · ユリウス日 (julian パッケージの関数も)、暦、時刻系、恒星時、火星の時刻
convertTimeScale関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A moment on one time scale as the same moment on another, in milliseconds since 1970 read on the target scale's own clock. UTC to TT is the leap seconds plus 32.184 s from 1972 and delta T before;
UT1 needs dut1 (UT1 minus UTC, from the IERS) and is UTC when it is left out, which is within 0.9 s; the TDB term is under 2 ms.
インポート
import { convertTimeScale } from "@johnmorrisdotca/wakusei-planets/time";
定義
function convertTimeScale(when: When, from: TimeScale, to: TimeScale, options?: { dut1?: number; }): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
when | When | A |
from | TimeScale | The scale it is on. |
to | TimeScale | The scale wanted. |
options (省略可) | { dut1?: number; } |
|
戻り値
number
Milliseconds since 1970 on the to scale.
例
import { convertTimeScale } from "@johnmorrisdotca/wakusei-planets/time";
const utc = Date.UTC(2026, 10, 7, 12);
console.log((convertTimeScale(utc, "utc", "tt") - utc) / 1000, (convertTimeScale(utc, "utc", "gps") - utc) / 1000);69.184 18出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。