Skip to the content

Kotoba言葉

Load only the word lists you need, mark repeated letters correctly and play a daily or seeded word game.

Kotoba is the Japanese word for words. About the name

Contents

Reference · Marking, scores and game rules

isDayKeyfunction

Whether the text is a real calendar date written YYYY-MM-DD, from the year 0000 to 9999.

Import it

import { isDayKey } from "@johnmorrisdotca/kotoba";

Definition

function isDayKey(text: unknown): text is DayKey

Parameters

NameTypeDescription
textunknown

The date text to validate, or localized template specified by the signature.

Returns

boolean

Whether the text is a real calendar date written YYYY-MM-DD, from the year 0000 to 9999.

Examples

import { isDayKey } from "@johnmorrisdotca/kotoba";

console.log(isDayKey("2026-10-12"));
true

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kotoba 1.2.0.