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

daySeedfunction

A day's seed inside a block kept for it: the block's first seed plus the date as a number. With a block from 1,000,000,000, 2026-10-03 is 1,020,261,003: still readable, and never a seed drawn at random if the block is reserved when drawing (drawSeed).

Import it

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

Definition

function daySeed(day: DayKey, block: SeedBlock): number

Parameters

NameTypeDescription
daystring

A real calendar day in YYYY-MM-DD form.

blockSeedBlock

The reserved seed block: its starting seed and length.

Returns

number

A day's seed inside a block kept for it: the block's first seed plus the date as a number. With a block from 1,000,000,000, 2026-10-03 is 1,020,261,003: still readable, and never a seed drawn at random if the block is reserved when drawing (drawSeed).

Examples

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

const block = { from: 1000000000, size: 100000000 };
console.log(daySeed("2026-10-11", block));
1020261011

What it prints (run when this page was built)

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