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

dayNumberfunction

How many days after 1970-01-01 a day is, counting the calendar and nothing else: a day has no hours here.

Import it

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

Definition

function dayNumber(day: DayKey): number

Parameters

NameTypeDescription
daystring

A valid YYYY-MM-DD date or moment specified by the signature.

Returns

number

How many days after 1970-01-01 a day is, counting the calendar and nothing else: a day has no hours here.

Examples

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

console.log(dayNumber("2026-10-12"));
20738

What it prints (run when this page was built)

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