1 | {
|
2 | "title": "Date",
|
3 | "@id": "schema:Date",
|
4 | "extends": "Entity",
|
5 | "role": "tertiary",
|
6 | "status": "stable",
|
7 | "category": "data",
|
8 | "description": "A date encoded as a ISO 8601 string.",
|
9 | "$comment": "This type serves mainly to disambiguate an ISO 8601 date string from\na plain string. It should generally be used instead of a date formatted string.\n",
|
10 | "parser": "date",
|
11 | "properties": {
|
12 | "type": {
|
13 | "@id": "schema:type",
|
14 | "description": "The name of the type.",
|
15 | "type": "string",
|
16 | "enum": [
|
17 | "Date"
|
18 | ],
|
19 | "default": "Date",
|
20 | "from": "Entity"
|
21 | },
|
22 | "id": {
|
23 | "@id": "schema:id",
|
24 | "description": "The identifier for this item.",
|
25 | "type": "string",
|
26 | "from": "Entity"
|
27 | },
|
28 | "meta": {
|
29 | "@id": "stencila:meta",
|
30 | "description": "Metadata associated with this item.",
|
31 | "type": "object",
|
32 | "from": "Entity"
|
33 | },
|
34 | "value": {
|
35 | "@id": "schema:value",
|
36 | "description": "The date as an ISO 8601 string.",
|
37 | "anyOf": [
|
38 | {
|
39 | "type": "string",
|
40 | "format": "date-time"
|
41 | },
|
42 | {
|
43 | "type": "string",
|
44 | "format": "date"
|
45 | },
|
46 | {
|
47 | "type": "string",
|
48 | "pattern": "\\d{4}"
|
49 | }
|
50 | ],
|
51 | "from": "Date"
|
52 | }
|
53 | },
|
54 | "required": [
|
55 | "type",
|
56 | "value"
|
57 | ],
|
58 | "file": "Date.schema.yaml",
|
59 | "children": [],
|
60 | "descendants": [],
|
61 | "$schema": "http://json-schema.org/draft-07/schema#",
|
62 | "$id": "https://schema.stenci.la/v1/Date.schema.json",
|
63 | "source": "https://github.com/stencila/schema/blob/master/schema/Date.schema.yaml",
|
64 | "type": "object",
|
65 | "additionalProperties": false,
|
66 | "propertyAliases": {}
|
67 | }
|