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
| Name | Type | Description |
|---|---|---|
day | string | 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"));20738What it prints (run when this page was built)