Interval

DatatypeDraftv1.0.0-rc.2

One window of time: a start, an end, a duration, or any two of them. When the start and the end are both given, the end is not before the start.

https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Interval.json

Fields

  • start
    date-time (RFC 3339)

    When the window starts (ISO 8601, with an offset or Z).

  • end
    date-time (RFC 3339)

    When the window ends (ISO 8601, with an offset or Z).

  • duration
    text

    How long the window lasts (ISO 8601 duration, for example PT15M).

  • At least one of start, end or duration.

Forms

A value of this schema takes one of these forms.

Links

Examples

An id that another example defines opens that record.

Example 1

{
  "start": "2026-07-15T22:00:00-06:00",
  "end": "2026-07-16T07:00:00-06:00"
}
Show 2 more examples

Example 2

{
  "start": "2026-07-15T18:00:00Z",
  "duration": "PT1H"
}

Example 3

{
  "duration": "P14D"
}

Changes and file

Changes

  1. 0.1.0 First version.

Schema file

Show the JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Interval.json",
  "title": "Interval",
  "description": "One window of time: a start, an end, a duration, or any two of them. When the start and the end are both given, the end is not before the start.",
  "type": "object",
  "properties": {
    "start": {
      "type": "string",
      "format": "date-time",
      "description": "When the window starts (ISO 8601, with an offset or Z)."
    },
    "end": {
      "type": "string",
      "format": "date-time",
      "description": "When the window ends (ISO 8601, with an offset or Z)."
    },
    "duration": {
      "type": "string",
      "format": "duration",
      "description": "How long the window lasts (ISO 8601 duration, for example PT15M)."
    }
  },
  "anyOf": [
    {
      "properties": {
        "start": true
      },
      "required": [
        "start"
      ]
    },
    {
      "properties": {
        "end": true
      },
      "required": [
        "end"
      ]
    },
    {
      "properties": {
        "duration": true
      },
      "required": [
        "duration"
      ]
    }
  ],
  "patternProperties": {
    "^x-": {}
  },
  "unevaluatedProperties": false,
  "examples": [
    {
      "start": "2026-07-15T22:00:00-06:00",
      "end": "2026-07-16T07:00:00-06:00"
    },
    {
      "start": "2026-07-15T18:00:00Z",
      "duration": "PT1H"
    },
    {
      "duration": "P14D"
    }
  ],
  "x-ods-status": "draft",
  "x-ods-kind": "datatype",
  "x-ods-module": "core",
  "x-ods-changes": {
    "0.1.0": "First version."
  }
}