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

nextDayStartfunction

The first moment of the day after the one at falls on, in that zone: when a daily seed next changes. Found by searching the next 27 hours for the millisecond the date turns, so daylight saving and half-hour zones need no special case.

Import it

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

Definition

function nextDayStart(at: Date, timeZone?: string): Date

Parameters

NameTypeDescription
atDate

The moment to read as a calendar day.

timeZone (optional)string

The IANA time-zone name; UTC when omitted.

Returns

Date

The first moment of the day after the one at falls on, in that zone: when a daily seed next changes. Found by searching the next 27 hours for the millisecond the date turns, so daylight saving and half-hour zones need no special case.

Examples

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

console.log(nextDayStart(new Date("2026-10-11T12:00:00Z"), "UTC").toISOString());
2026-10-12T00:00:00.000Z

What it prints (run when this page was built)

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