Reference · Streams, draws and seeds
daysBetweenfunction
How many days to is after from: negative when it is before.
Import it
import { daysBetween } from "@johnmorrisdotca/tane";
Definition
function daysBetween(from: DayKey, to: DayKey): number
Parameters
| Name | Type | Description |
|---|---|---|
from | string | The starting calendar day. |
to | string | The ending calendar day. |
Returns
number
How many days to is after from: negative when it is before.
Examples
import { daysBetween } from "@johnmorrisdotca/tane";
console.log(daysBetween("2026-10-11", "2026-10-14"));3What it prints (run when this page was built)