dayKey関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The day a moment falls on, in UTC or in the named IANA time zone.
インポート
import { dayKey } from "@johnmorrisdotca/tane";
定義
function dayKey(at: Date, timeZone?: string): DayKey
引数
| 名前 | 型 | 説明 |
|---|---|---|
at | Date | The moment to read as a calendar day. |
timeZone (省略可) | string | The IANA time-zone name; UTC when omitted. |
戻り値
string
The day a moment falls on, in UTC or in the named IANA time zone.
例
import { dayKey } from "@johnmorrisdotca/tane";
console.log(dayKey(new Date("2026-10-11T03:00:00Z"), "America/Toronto"));2026-10-10出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。