citation-style-language / schema

Citation Style Language schema
https://citationstyles.org/
MIT License
187 stars 60 forks source link

input: Add 'format' property for edtf dates #423

Closed bdarcus closed 2 years ago

bdarcus commented 2 years ago

This allows use of an edtf.js-based validator on the dates.

https://github.com/retorquere/json-schema-edtf

The json schema spec says tools should ignore the property if they don't know what to do with its value.

Note: season intervals is a non-standard extension available in edtf.js, which we need.

Close #421

bdarcus commented 2 years ago

So is this good @retorquere?

Maybe I just add a link in the documentation https://github.com/retorquere/json-schema-edtf?

One substantive question: adding season intervals is important for us. Does it mean, however, that those aren't valid edtf dates, and that other edt validators will flag them?

retorquere commented 2 years ago

I welcome seeing the documentation improved - I didn't know what else to put there.

It seems likely to me that other edtf processors would report season intervals as invalid dates, but given that we need these season intervals, the CSL dates would be "EDTF plus season intervals", not "EDTF", and anyone that would choose to treat dates as strictly EDTF in something claiming to be CSL would be out of line with the CSL spec. A clear case of "don't do that" I think.

bdarcus commented 2 years ago

I welcome seeing the documentation improved - I didn't know what else to put there.

To be clear, I was meaning here.