Period
A recurring window in local time that a rule judges by, such as night-time from 22:00 to 07:00. A window whose end is not after its start runs past midnight.
https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Period.json
Fields
idtextnot emptyThe record's id: unique within the document.
nameRequiredtextThe name the regulation uses, for example Nighttime.
descriptiontextWhat the period covers, in words.
citationThe part of the published framework that defines the period.
timeZonetextThe IANA time zone the times are in, for example America/Edmonton. Leave it out to use the zone of the place being judged.
windowsRequiredThe windows that make up the period. A time falls in the period when it falls in any window.
Window
One daily window of a period.
daysList ofOne ofmontuewedthufrisatsun1 or more itemsThe days the window applies on. Leave it out for every day.
publicHolidaysOne ofthe codes belowHow the window treats public holidays. Leave it out to ignore them.
include- The window also applies on public holidays.
exclude- The window does not apply on public holidays.
only- The window applies on public holidays only.
startRequiredtextmatches ^([01][0-9]|2[0-3]):[0-5][0-9]$When the window starts each day, in local time (HH:MM).
endRequiredtextmatches ^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$When the window ends each day, in local time (HH:MM, or 24:00 for midnight at the end of the day).
Links
Held by Records that embed this one, with their field that holds it.
Pointed at by Records that hold this one's id, with their field that holds it.
- AllocationPartStateShare.periodWhere and when an activity happens, and the operating states its sources run in there.
- ConditionEntityperiodA state of the surroundings over an area and a time, such as the ambient sound, the terrain, the weather or the water. Its properties come from a quantities vocabulary; which list holds it (ambient, terrain, weather or hydrology) says what sort it is.
- CriterionPartperiodOne rule that must be checked. It compares a metric, summed up by a statistic over a period, with a limit, for the features it applies to.
- ValueDatatypeperiodAn amount with its unit and uncertainty. A list amount can lie along axes (a spectrum, a time series, a profile, a grid), and a large amount can sit in a File. Measured, calculated and set values all use it.
Examples
An id that another example defines opens that record.
Example 2
{
"id": "nsw-day",
"name": "Day",
"timeZone": "Australia/Sydney",
"windows": [
{
"days": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat"
],
"publicHolidays": "exclude",
"start": "07:00",
"end": "18:00"
},
{
"days": [
"sun"
],
"start": "08:00",
"end": "18:00"
},
{
"publicHolidays": "only",
"start": "08:00",
"end": "18:00"
}
]
}Show 1 more exampleHide the other example
Example 1
{
"id": "night",
"name": "Nighttime",
"windows": [
{
"start": "22:00",
"end": "07:00"
}
]
}Changes and file
Changes
- 0.1.0 First version.
Schema file
Show the JSON SchemaHide the JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Period.json",
"title": "Period",
"description": "A recurring window in local time that a rule judges by, such as night-time from 22:00 to 07:00. A window whose end is not after its start runs past midnight.",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "The record's id: unique within the document."
},
"name": {
"type": "string",
"description": "The name the regulation uses, for example Nighttime."
},
"description": {
"type": "string",
"description": "What the period covers, in words."
},
"citation": {
"$ref": "Citation.json",
"description": "The part of the published framework that defines the period."
},
"timeZone": {
"type": "string",
"description": "The IANA time zone the times are in, for example America/Edmonton. Leave it out to use the zone of the place being judged."
},
"windows": {
"type": "array",
"minItems": 1,
"description": "The windows that make up the period. A time falls in the period when it falls in any window.",
"items": {
"$ref": "#/$defs/Window"
}
}
},
"required": [
"name",
"windows"
],
"patternProperties": {
"^x-": {}
},
"unevaluatedProperties": false,
"$defs": {
"Window": {
"type": "object",
"properties": {
"days": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"enum": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat",
"sun"
]
},
"description": "The days the window applies on. Leave it out for every day."
},
"publicHolidays": {
"type": "string",
"enum": [
"include",
"exclude",
"only"
],
"description": "How the window treats public holidays. Leave it out to ignore them.",
"x-ods-options": [
{
"value": "include",
"title": "Include",
"description": "The window also applies on public holidays."
},
{
"value": "exclude",
"title": "Exclude",
"description": "The window does not apply on public holidays."
},
{
"value": "only",
"title": "Only",
"description": "The window applies on public holidays only."
}
]
},
"start": {
"type": "string",
"pattern": "^([01][0-9]|2[0-3]):[0-5][0-9]$",
"description": "When the window starts each day, in local time (HH:MM)."
},
"end": {
"type": "string",
"pattern": "^(([01][0-9]|2[0-3]):[0-5][0-9]|24:00)$",
"description": "When the window ends each day, in local time (HH:MM, or 24:00 for midnight at the end of the day)."
}
},
"required": [
"start",
"end"
],
"description": "One daily window of a period.",
"patternProperties": {
"^x-": {}
},
"unevaluatedProperties": false
}
},
"examples": [
{
"id": "night",
"name": "Nighttime",
"windows": [
{
"start": "22:00",
"end": "07:00"
}
]
},
{
"id": "nsw-day",
"name": "Day",
"timeZone": "Australia/Sydney",
"windows": [
{
"days": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat"
],
"publicHolidays": "exclude",
"start": "07:00",
"end": "18:00"
},
{
"days": [
"sun"
],
"start": "08:00",
"end": "18:00"
},
{
"publicHolidays": "only",
"start": "08:00",
"end": "18:00"
}
]
}
],
"x-ods-status": "draft",
"x-ods-kind": "part",
"x-ods-module": "core",
"x-ods-changes": {
"0.1.0": "First version."
}
}