Last active
July 6, 2020 11:24
-
-
Save bdarcus/62ca8d92bfe5b410b2f9b808e541ce9b to your computer and use it in GitHub Desktop.
An Object Representation of an EDTF Date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "CSL EDTF Date Definitions", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"description": "CSL supports EDTF levels 0 and 1.", | |
"definitions": { | |
"date-object": { | |
"title": "Date Object", | |
"description": "An EDTF date represented as an object.", | |
"date-parts": { | |
"type": "array", | |
"items": [ | |
{ | |
"type": "integer", | |
"description": "year", | |
"pattern": "[0-9]{4}" | |
}, | |
{ | |
"type": "integer", | |
"description": "month or season FIX", | |
"pattern": "[1,2]{1,2}" | |
}, | |
{ | |
"type": "integer", | |
"description": "day", | |
"pattern": "([1-9]|[12][0-9]|3[01])" | |
} | |
], | |
"minItems": 1, | |
"maxItems": 3 | |
}, | |
"literal": { | |
"title": "Literal date", | |
"description": "A date that should be passed through to the processor as is; for dates that cannot be represented in EDTF.", | |
"examples": ["Han Dynasty"], | |
"type": "string" | |
}, | |
"approximate": { | |
"title": "Approximate", | |
"description": "Indicates an approximate or circa date, which may be presented as `circa May 23, 1972`.", | |
"type": "boolean" | |
}, | |
"uncertain": { | |
"title": "Uncertain", | |
"description": "Indicates uncertainty about a date representation, which may be presented as `May 23, 1972?`", | |
"type": "boolean" | |
} | |
}, | |
"required": ["date-parts"] | |
}, | |
"date-range": { | |
"title": "Date Range", | |
"description": "An open end or begin of the range can be represented with a null.", | |
"type": "array", | |
"items": { | |
"$ref": "#definitions/date-object" | |
}, | |
"minItems": 2, | |
"maxItems": 2 | |
}, | |
"edtf-string": { | |
"title": "EDTF string", | |
"description": "Dates represented as an EDTF string.", | |
"examples": ["2014-21/2014-22","1936-03-25~"], | |
"type": "string", | |
"pattern": "^[0-9-%~X?.\/]{4,}$" | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO:
literal
?