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

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

Open
qjhart opened this issue Nov 7, 2022 · 0 comments
Open

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

qjhart opened this issue Nov 7, 2022 · 0 comments
Assignees

Comments

@qjhart
Copy link
Member

qjhart commented Nov 7, 2022

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
  1. In the client always show the unaltered date.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants