Skip to content

Main content

Random Calendar Event Set Generator

Generate exact-count date-only half-open events inside a supplied window, choosing feasible bounded durations sequentially and optionally distributing nonnegative gaps without overlaps; allowed-overlap mode uses the existing random date core, not a uniform draw over all event sets.

Loading tool…

Description

Generate exact-count date-only half-open events inside a supplied window, choosing feasible bounded durations sequentially and optionally distributing nonnegative gaps without overlaps; allowed-overlap mode uses the existing random date core, not a uniform draw over all event sets.

A workflow or scheduling fixture makes ordering, dependencies, capacity, and timing explicit. Returning both the constructed records and their checks helps consumers distinguish a valid arrangement from a simulated failure case.

Generate exact-count date-only half-open events inside a supplied window, choosing feasible bounded durations sequentially and optionally distributing nonnegative gaps without overlaps; allowed-overlap mode uses the existing random date core, not a uniform draw over all event sets.

When to use this tool

Use this generator to create reproducible calendar event set cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply count, startDate, endDateExclusive, minimumDurationDays, maximumDurationDays, overlapPolicy in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read events, overlappingPairs. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.

Draw event durations within a plain-date window. If overlap is forbidden, reserve minimum remaining durations and distribute leftover days as gaps; otherwise choose valid starts independently. Return half-open date intervals and all strict overlapping pairs.1

Delegated operations used for this result: date. Their calculation or parsing conventions apply to the corresponding result fields.2

Input fieldMeaning and unitsAccepted input
countCountRequired. Safe integer; minimum 1; maximum 128.
startDateStart DateRequired. Text; minimum UTF-16 length 10; maximum UTF-16 length 10.
endDateExclusiveEnd Date ExclusiveRequired. Text; minimum UTF-16 length 10; maximum UTF-16 length 10.
minimumDurationDaysMinimum Duration DaysRequired. Safe integer; minimum 1.
maximumDurationDaysMaximum Duration DaysRequired. Safe integer; minimum 1.
overlapPolicyOverlap PolicyRequired. Text; one of "allowed", "forbidden".
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
eventsEventsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 128.
events[].idLiteral identifier used independently of display labels.Required. Safe integer; minimum 0; maximum 127.
events[].startDateStart DateRequired. Text; minimum UTF-16 length 10; maximum UTF-16 length 10.
events[].endDateExclusiveEnd Date ExclusiveRequired. Text; minimum UTF-16 length 10; maximum UTF-16 length 10.
events[].durationDaysDuration DaysRequired. Safe integer; minimum 1.
overlappingPairsOverlapping PairsRequired. Array of Array of Safe integer; minimum 0; maximum 127.; minimum items 2; maximum items 2.; maximum items 8128.
randomnessReplay source and normalized 32-bit seed, or null seed for an advancing context source.Required. Object; no unknown keys.
randomness.seedOptional safe-integer replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "count": 3,
    "startDate": "2026-10-01",
    "endDateExclusive": "2026-10-15",
    "minimumDurationDays": 1,
    "maximumDurationDays": 4,
    "overlapPolicy": "forbidden",
    "seed": 42
  },
  "output": {
    "events": [
      {
        "id": 0,
        "startDate": "2026-10-02",
        "endDateExclusive": "2026-10-05",
        "durationDays": 3
      },
      {
        "id": 1,
        "startDate": "2026-10-06",
        "endDateExclusive": "2026-10-08",
        "durationDays": 2
      },
      {
        "id": 2,
        "startDate": "2026-10-09",
        "endDateExclusive": "2026-10-13",
        "durationDays": 4
      }
    ],
    "overlappingPairs": [],
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Touching end/start dates do not overlap. All events fit the window but the construction is not uniform over every feasible schedule. There are no times of day, time zones, calendar-service writes, or real bookings.
  • A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Calendar Event Set Generator — tool.io

  2. Calculation or validation: random/date — tool.io

Similar or alternative tools

  • Calendar Overlap and Common Gap Finder

    Compare bounded supplied busy calendars over an explicit half-open epoch-millisecond window, deduplicating same-calendar overlap and delegating interval cells to report common gaps, overlaps and per-calendar occupied duration.

  • Random Assessment Item Sampler Generator

    Sample distinct existing question records without replacement within each requested objective count, shuffle the combined paper, and delegate coverage auditing against a caller-selected minimum. Entire supplied prompts and answers are retained unchanged; extra bank objectives are ignored, shortages fail explicitly, and no assessment-validity or difficulty claim is made.