date_range
TemporalGenerate correlated date pairs where start is always before end. Returns { start, end } objects — perfect for bookings, reservations, project timelines, and subscription periods. The gap is configurable.
Example Outputs
{ "start": "2026-01-10", "end": "2026-01-17" }{ "start": "2026-03-01", "end": "2026-03-15" }Parameters
| Parameter | Description |
|---|---|
| min_gap_days | Minimum days between dates (default 1) |
| max_gap_days | Maximum days between dates (default 30) |
| min_date | Earliest start date |
| max_date | Latest end date |
API Usage
Send a POST request to generate date range data:
curl -X POST https://mockhero.dev/api/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tables": [
{
"name": "example",
"count": 5,
"fields": [
{
"name": "date_range",
"type": "date_range"
}
]
}
]
}'Common Use Cases
- Hotel booking testing
- Project timeline seeding
- Event scheduling
- Subscription period testing
Quick Info
- Field Type
- date_range
- Category
- Temporal
- Parameters
- 4 parameters
- Output Format
- JSON, CSV, SQL
Generate Date Range + 155 more types via API
One API call. Multiple tables. Relational integrity. Free tier included.