# Copyright 2021 - 2025 PeopleWare n.v.
#
# Licensed under the Apache License, Version 2.0 (the “License”);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an “AS IS” BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

type: object
examples:
  - start: 1996-12-21
    end: 2011-08-23
  - start: 2022-08-26
description: >-
  Half-right-open time interval `[start, end[` of day dates. `start ≤ end`. If there is no `end`, this means the
  interval stretches until the heath death of the universe. Usually this means that interval is believed to be still
  ongoing with the knowledge represented.


  Please use [Allen's Interval Algebra](https://en.wikipedia.org/wiki/Allen%27s_interval_algebra) ("[Maintaining
  Knowledge about Temporal Intervals](http://cse.unl.edu/~choueiry/Documents/Allen-CACM1983.pdf)") to reason about time
  intervals.


  This is a fuzzy description of a time interval, given timezones. This is stored, communicated, and visualized as-is,
  and interpreted locally.
properties:
  start:
    type: string
    examples:
      - 2020-01-23
      - 1999-01-01
    description: >-
      A day in the history of the world.


      This is a fuzzy description of a time interval, given timezones. This is stored, communicated, and visualized
      as-is, and interpreted locally.


      Uses the ISO-8601 representation.
    pattern: ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|30|31)$
  end:
    type: string
    examples:
      - 2020-01-23
      - 1999-01-01
    description: >-
      A day in the history of the world.


      This is a fuzzy description of a time interval, given timezones. This is stored, communicated, and visualized
      as-is, and interpreted locally.


      Uses the ISO-8601 representation.
    pattern: ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|30|31)$
required:
  - start
additionalProperties: false
