ucd-library / vessel

Vivo schema + fusEki + elaStic Search; rEsearch profiLes
MIT License
0 stars 0 forks source link

Allow ISO-8601/2019 (or EDTF) as dates for any date field in DAMS #78

Closed qjhart closed 2 years ago

qjhart commented 2 years ago

Dates published in the DAMS currently are parsed as single dateTime values when represented in the indexed document, and the client. We need to allow for date ranges to be specified in the system. The proposal is to 1) Specify the datatype in sparql as DCT:date 2) use the Extended Date Time Format https://www.npmjs.com/package/edtf as the parser for date fields 3) parse any text id'ed as either dct:date of xsd:date in this method (even though that's a bit unfair for xsd:date) 4) Not worry yet that JENA itself has no support for that (although we can add javascript functions for this)

5) Then for indexing; store both a min and max for each date in the record, for dateCreated and datePublished as well as the unalured date text field

edtf('2016-02').min        #-> 1454284800000, i.e. 2016-02-01T00:00:00Z
edtf('2016-02').max        #-> 1456790399999, i.e. 2016-02-29T23:59:59Z

6) In the client always show the unaltered date.