Reference · Streams, draws and seeds
isDayKeyfunction
Whether a text is a real date written YYYY-MM-DD: 2026-02-30 is not.
Import it
import { isDayKey } from "@johnmorrisdotca/tane";
Definition
function isDayKey(text: string): boolean
Parameters
| Name | Type | Description |
|---|---|---|
text | string | Text to hash, validate or decode. |
Returns
boolean
Whether a text is a real date written YYYY-MM-DD: 2026-02-30 is not.
Examples
import { isDayKey } from "@johnmorrisdotca/tane";
console.log(isDayKey("2026-02-30"));falseWhat it prints (run when this page was built)