リファレンス · ユリウス日 (julian パッケージの関数も)、暦、時刻系、恒星時、火星の時刻
fromCalendar関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A date and time of day in UTC as a moment, in milliseconds since 1970. A day that does not exist (31 April, 29 February in a common year, or 5 to 14 October 1582 in the auto calendar) throws a RangeError.
インポート
import { fromCalendar } from "@johnmorrisdotca/wakusei-planets/time";
定義
function fromCalendar(civil: { year: number; } & Partial<Omit<CivilTime, "year">>, calendar?: Calendar): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
civil | { year: number; } & Partial<Omit<CivilTime, "year">> | The year (astronomical), and the month (1), day (1), hour, minute, second and millisecond (0) when left out. |
calendar (省略可) | Calendar |
|
戻り値
number
Milliseconds since 1970.
例
import { fromCalendar } from "@johnmorrisdotca/wakusei-planets/time";
console.log(fromCalendar({ year: 333, month: 1, day: 27, hour: 12 }, "julian"), new Date(fromCalendar({ year: 2000, month: 1, day: 1, hour: 12 })).toISOString());-51656356800000 2000-01-01T12:00:00.000Z出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。