Calendar Date Fuzzer
Generate random dates around a target date using configurable fuzz ranges, distributions (uniform, Gaussian, triangular), and output formats.
About
Fuzz testing temporal data requires controlled randomization around a known anchor point. A naive approach - uniform random across a calendar year - fails to model real-world clustering where events concentrate near a reference timestamp with predictable decay. This tool applies statistical distributions (uniform, Gaussian via Box-Muller, triangular) to a seed date d0, producing n output dates within a window of ±R units. Each offset δ is sampled from the chosen distribution, then added at millisecond precision: dout = d0 + δ. Incorrect date fuzzing in integration tests masks timezone bugs, off-by-one boundary errors, and leap-second edge cases that surface only in production. The tool caps output at 10,000 samples and computes summary statistics (mean, median, σ) so you can verify the spread before export.
Formulas
The core operation adds a random offset δ (in milliseconds) to the seed date's Unix timestamp:
The total fuzz range R in milliseconds is computed from user inputs:
For uniform distribution, where U ∈ [0, 1):
For Gaussian distribution, Box-Muller transform with U1, U2 ∈ (0, 1):
The σ is set to R3 so that ≈99.7% of samples fall within ±R. Values outside the range are clamped.
For the results summary, standard deviation of the output set:
Where D = days, H = hours, M = minutes, S = seconds, U = uniform random variate, n = sample count, = mean of generated timestamps.
Reference Data
| Distribution | PDF Shape | Best For | Offset Formula | Clustering |
|---|---|---|---|---|
| Uniform | Flat | Equal-probability spread | δ = R ⋅ (2U − 1) | None |
| Gaussian | Bell curve | Natural clustering around center | Box-Muller: δ = σ ⋅ √−2 ln U1 cos(2πU2) | Strong center |
| Triangular | Triangle peak | Moderate center bias | Inverse CDF with mode at center | Moderate center |
| Edge-weighted | U-shape | Boundary stress testing | Inverted triangular | Strong edges |
| Common Output Formats | ||||
| ISO 8601 | 2024-03-15T14:30:00.000Z | |||
| RFC 2822 | Fri, 15 Mar 2024 14:30:00 +0000 | |||
| Unix Timestamp | 1710513000 | |||
| US Locale | 03/15/2024 2:30 PM | |||
| EU Locale | 15.03.2024 14:30 | |||
| Date Only | 2024-03-15 | |||
| Time Only | 14:30:00 | |||
| YYYY/MM/DD | 2024/03/15 | |||
| DD-Mon-YYYY | 15-Mar-2024 | |||
| Compact | 20240315T143000Z | |||
| Fuzz Range Reference | ||||
| 1 min | 60,000 ms | Micro-jitter for timestamp tests | ||
| 1 hr | 3,600,000 ms | Intra-day scheduling tests | ||
| 1 day | 86,400,000 ms | Daily boundary tests | ||
| 7 days | 604,800,000 ms | Weekly window fuzzing | ||
| 30 days | 2,592,000,000 ms | Monthly report testing | ||
| 365 days | 31,536,000,000 ms | Annual dataset generation | ||