isDayKey関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Whether the text is a real calendar date written YYYY-MM-DD, from the year 0000 to 9999.
インポート
import { isDayKey } from "@johnmorrisdotca/kotoba";
定義
function isDayKey(text: unknown): text is DayKey
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | unknown | The date text to validate, or localized template specified by the signature. |
戻り値
boolean
Whether the text is a real calendar date written YYYY-MM-DD, from the year 0000 to 9999.
例
import { isDayKey } from "@johnmorrisdotca/kotoba";
console.log(isDayKey("2026-10-12"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。