Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(input): Add EDTF as an option for date representation #284

Merged
merged 6 commits into from
Jun 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions schemas/input/csl-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -422,9 +422,14 @@
"title": "Custom key-value pairs.",
"type": "object",
"description": "Used to store additional information that does not have a designated CSL JSON field. The note field can also store additional information, but custom is preferred for storing key-value pairs.",
"examples" : [
{"short_id": "xyz", "other-ids": ["alternative-id"]},
{"metadata-double-checked": true}
"examples": [
{
"short_id": "xyz",
"other-ids": ["alternative-id"]
},
{
"metadata-double-checked": true
}
]
}
},
Expand Down Expand Up @@ -468,8 +473,19 @@
}
]
},
"edtf-datatype": {
"title": "EDTF datatype pattern",
"description": "CSL input supports EDTF, validated against this regular expression.",
"type": "string",
"pattern": "^[0-9-%~X?.\/]{4,}$"
},
"date-variable": {
"title": "Date content model.",
"description": "The CSL input model supports two different date representations: an EDTF string (preferred), and a more structured alternative.",
"anyOf": [
{
"$ref": "#/definitions/edtf-datatype"
},
{
"properties": {
"date-parts": {
Expand All @@ -496,6 +512,9 @@
},
"raw": {
"type": "string"
},
"edtf": {
"$ref": "#/definitions/edtf-datatype"
}
},
"additionalProperties": false
Expand Down