dailyIndex関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Which of count words a day gets, from 0 to count - 1. Over any run of
count days that starts at a multiple of count days after 1970-01-01,
every place comes up exactly once. salt names the list, so that two lists
of one length are not dealt in the same order.
インポート
import { dailyIndex } from "@johnmorrisdotca/kotoba";
定義
function dailyIndex(count: number, day: DayKey, salt?: string): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
count | number | The positive number of words to choose among. |
day | string | A valid YYYY-MM-DD date or moment specified by the signature. |
salt (省略可) | string | Stable text distinguishing this daily word stream. |
戻り値
number
Which of count words a day gets, from 0 to count - 1. Over any run of count days that starts at a multiple of count days after 1970-01-01, every place comes up exactly once. salt names the list, so that two lists of one length are not dealt in the same order.
例
import { dailyIndex } from "@johnmorrisdotca/kotoba";
console.log(dailyIndex(3,"2026-10-12","sample"));0出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。