MockHero

date_range

Temporal

Generate 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

ParameterDescription
min_gap_daysMinimum days between dates (default 1)
max_gap_daysMaximum days between dates (default 30)
min_dateEarliest start date
max_dateLatest 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

Try it now

Generate date range data instantly in the playground.

Generate Date Range + 155 more types via API

One API call. Multiple tables. Relational integrity. Free tier included.

Get Started Free