ランダム日付生成
好きな2つの日付の間からランダムに日付を——テストデータ、執筆のお題、ゲームの予定、サプライズのお出かけ日に。平日だけ・週末だけにもできます。
- 好きな期間
- 平日だけ・週末だけ
- 最大50日
ランダム日付 API
ランダム日付 の結果を JSON で取得できます。読み取り専用で、少量の利用なら API キーは不要、クロスオリジンのリクエストにも対応しています。
GET
/api/v1/tools/random-datecurl https://randnext.com/api/v1/tools/random-date?start=2026-01-01&end=2026-12-31&count=3パラメーター
| パラメーター | 型 | 説明(英語) | 初期値 / 使える値 |
|---|---|---|---|
start | date | First eligible date, inclusive, in YYYY-MM-DD format. Defaults to January 1 of the current year. | 任意YYYY-MM-DD |
end | date | Last eligible date, inclusive, in YYYY-MM-DD format. Defaults to December 31 of the current year. | 任意YYYY-MM-DD |
filter | string | Limit eligible dates to all days, weekdays, or weekends. | 初期値:anyany, weekdays, weekends |
count | integer | Number of results to return. | 初期値:11〜50 |
unique | boolean | When true, the response will not contain the same date twice. | 初期値:truetrue または false |
sort | boolean | When true, return selected dates in chronological order. | 初期値:truetrue または false |
こちらもおすすめ
使い方
- 1開始日と終了日を設定します。
- 2対象の曜日と個数を選びます。
- 3「生成」を押して日付をコピーします。
よくある質問
開始日と終了日も含まれますか?
はい。期間の両端の日付も選ばれる可能性があります。
どの日も同じ確率ですか?
はい。期間内の対象となる日はすべて同じ確率です。