The Random Date Generator draws uniformly sampled calendar dates between two inclusive YYYY-MM-DD endpoints entirely in your browser, with no daylight-saving drift and a hard cap of 1,000 dates per generation. This cheat sheet collects every input, validation rule, output format, mode flag, and limit so you can use the tool without guessing. The generator treats each date as a UTC integer day ordinal measured in exact 86,400,000-millisecond steps from 1970-01-01, then maps each selected position back into YYYY-MM-DD with UTC components. Randomness comes from browser Web Crypto getRandomValues, not Math.random(), and a rejection-sampling pass removes the modulo bias that plain modulo reduction would introduce. The list never leaves your browser, the tool refuses to silently repair invalid input, and editing any control clears the previous list so a stale result cannot masquerade as matching new settings. Use the sections below as a quick reference whenever you set up a draw, an Excel test fixture set, a classroom randomizer, or a writing prompt schedule.

Inputs the Generator Accepts at a Glance
The tool exposes three controls plus one toggle. Each one has a specific format and a specific failure mode if you get it wrong.
| Control | Accepted format | Accepted range | If you violate it |
|---|---|---|---|
| Start date | Strict YYYY-MM-DD | 0001-01-01 to 9999-12-31 | Reported as invalid; never silently repaired |
| End date | Strict YYYY-MM-DD | 0001-01-01 to 9999-12-31, must be on or after start date | Reported as invalid; never silently repaired |
| Count | Whole integer | 1 to 1,000 | Blank, zero, fraction, negative, or over-1,000 produces a clear error stating nothing was truncated |
| Allow duplicates | Toggle | On or off | In unique mode, a count larger than the inclusive day span is rejected |
Both endpoints are eligible for selection. A range from 2024-02-28 through 2024-03-01 can return February 28, February 29 (leap day), or March 1, never only the endpoints. A one-day range is valid and always returns that single date; if you need multiple copies of that one date you must enable duplicates.
How to Use the Random Date Generator
- Pick a start date and end date in strict YYYY-MM-DD form. Both endpoints are included in the eligible pool, so set them to the exact inclusive span you want to sample from.
- Enter a count between 1 and 1,000 and decide whether repeats are allowed. Leave the toggle on for independent draws from the full range, or turn it off for one draw per calendar day.
- Generate the list, verify the displayed range and count match your input, then copy or record the YYYY-MM-DD values you need for test fixtures, sample schedules, classroom draws, or writing prompts.
Editing either endpoint, the count, or the duplicate flag clears the previous result, so a list produced with earlier settings cannot remain on screen as if it matched the current controls.
Date Validation Rules
Validation is strict and runs in UTC components, following the Gregorian behavior implemented by ECMAScript Date (per the ECMAScript specification: Date Objects reference). Years divisible by four are normally leap years, century years are common unless divisible by 400. In practice this means 2000-02-29 and 2024-02-29 are accepted as valid calendar dates, while 1900-02-29 and 2023-02-29 are rejected. Month and day overflow is also rejected: an entry such as 2025-04-31 cannot quietly roll into May 1. The implementation uses setUTCFullYear rather than Date.UTC's legacy two-digit-year interpretation, so supported years 0001 through 0099 stay their literal years instead of being shifted into the twentieth century. The supported civil span runs from 0001-01-01 through 9999-12-31.
Daylight-Saving Behavior
The generator samples integer UTC day ordinals and formats results with UTC components instead of adding hours at local midnight. That distinction is the entire reason the tool exists. Adding 24 local hours can land at 23:00 or 01:00 near a clock change, which can skip a displayed date or repeat one. Converting a strict YYYY-MM-DD into its year, month, and day on a UTC Date object, reading the components back, dividing the UTC millisecond value by exactly 86,400,000, then sampling on those whole-day positions relative to 1970-01-01 is the structural fix. The same approach is described for browser-side date arithmetic in the Generate a Random Date in JavaScript Without DST Drift guide, and the underlying date semantics are defined by the ECMAScript specification referenced above.
Duplicate Mode vs Unique Mode
| Behavior | Duplicate mode (toggle on) | Unique mode (toggle off) |
|---|---|---|
| Sampling method | Each requested draw independently samples the full inclusive range | Sparse partial Fisher-Yates selection without replacement |
| Can the same date repeat? | Yes, by design | No; every date appears at most once |
| Probability per eligible date | Equal at every draw | Equal at every draw, with prior picks removed |
| Count cap inside a small range | Up to 1,000, even on a one-day range | Cannot exceed the inclusive day span |
| Memory profile | Grows with the requested count | Grows with the requested count, not with the multi-million-day range |
| If the count is too large | Error only when count is over 1,000 | Error when count exceeds the number of available dates; never silently enables duplicates |
| Best for | Monte Carlo fixtures, classroom picks, dice-style repetition | Distinct birthdays, audit trails, unique sample schedules |
Equal probability does not guarantee that a particular run looks evenly spaced, and duplicate mode can legitimately repeat values. If a run needs to look balanced at a glance, draw more than you need and prune the list yourself.
Output Format and Result Limits
Results come back in stable YYYY-MM-DD form, the same format the inputs require. The generator never appends a time of day, a timezone offset, or a long-date rendering. Dates do not exclude weekends, public holidays, historical calendar transitions, unavailable booking days, or organization-specific blackout dates, so check those constraints separately before using a date in a real process. The hard result cap is 1,000 dates per generation. A blank count, fraction, zero, negative value, or value above 1,000 produces a clear error stating the allowed range and that nothing was truncated. Unique mode rejects a count larger than the number of available dates instead of returning fewer results or quietly enabling duplicates.
Randomness Method and Audit Guidance
Randomness is sourced from browser Web Crypto via getRandomValues on unsigned 32-bit words, per the W3C Web Cryptography API reference. Mapping a random word to a date with raw modulo would give some dates one extra possible source value when the range size does not divide 2^32, so the generator uses a rejection-sampling pass: it accepts only the largest leading interval whose size is an exact multiple of the number of available dates, then applies modulo. Each accepted ordinal therefore has the same number of underlying 32-bit values. A bounded safety guard reports a failed random source if the API repeatedly returns values in the rejected tail. Math.random() is not used. For deterministic software tests, store the resulting dates or run your own seeded generator; Web Crypto is intentionally not seedable through this interface. If a selection has financial, legal, contest, security, or audit consequences, use a documented procedure with independent oversight and retained evidence, because the tool offers careful, unbiased sampling for ordinary utility work rather than a certified random-draw service.
If you're weighing options, Random IP Generator Example: Output From Each Mode covers this in detail.