Skip to the content

Tane種

Reproduce numbers from a seed, shuffle or pick items, share a daily puzzle and resume a saved stream.

Tane means seed in Japanese. About the name

Contents

Reference · Streams, draws and seeds

dayKeyfunction

The day a moment falls on, in UTC or in the named IANA time zone.

Import it

import { dayKey } from "@johnmorrisdotca/tane";

Definition

function dayKey(at: Date, timeZone?: string): DayKey

Parameters

NameTypeDescription
atDate

The moment to read as a calendar day.

timeZone (optional)string

The IANA time-zone name; UTC when omitted.

Returns

string

The day a moment falls on, in UTC or in the named IANA time zone.

Examples

import { dayKey } from "@johnmorrisdotca/tane";

console.log(dayKey(new Date("2026-10-11T03:00:00Z"), "America/Toronto"));
2026-10-10

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/tane 1.3.0.