-
Notifications
You must be signed in to change notification settings - Fork 88
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
publication_date: support for EDTF lvl 0 #23
Comments
Curious about other team members' proposed use cases for time in the date-time format. The only case I envision is if someone cataloging or depositing materials needs timestamp information on metadata that they edited within the same day. If a new record version is created on the same day, versioning information serves for differentiation. |
I don't think publication_date should have time. Time is useful for meta-metadata fields like the system created and updated dates that you might use for scripting. But this shouldn't be something we expect from the users. |
Reopening this based on a discussion in the chatroom. Could we support EDTF format for publication date? Specifically, it would be only "Level 0" of the spec for dates: Internal schema
1985 -> 1985-01-01 Above is what Biodiversity Literature Repository in Zenodo has been doing with dates. |
python-edtf might come in handy :-) |
Summary of further discussions EDTF Level 0 includes time interval as well, so we can support time interval with dates (not time):
Marshmallow We would need Marshmallow fields in order to parse and validate EDTF dates. Ought to be relatively simple with the Python library. Deposit form We will need a practical approach for the input field widget in the deposit form. Something like:
Templates/rendering Rendering an EDTF date is a bit more tricky due to L10N. Python EDTF can deliver earliest/latest date as well as a time struct object. Babel requires a full Python date object in order to localise it. Babel further defines four formats ( >>> format_date(date=date(1939,9,1), format='long')
u'September 1, 1939'
>>> format_date(date=date(1939,9,1), format='MMMM, y')
u'September, 1939' This would mean we should likely add a |
Currently onlypublication_date
is specified to support EDTF.However, all the rest of fields havedate-time
as format. Should they only be of formatdate
?date
was only introduced in JSONSchema draft 7 (more info here).Redefinition of this task ;)
As a depositor, I may be unsure about the
publication_date
of a record (e.g. sometime in World War II), but I want to convey this range as the publication date, because a publication date is needed to mint a DOI (DataCite) and it is more informative than nothing.technical implications
Allow
publication_date
field to be an EDTF of lvl 0The text was updated successfully, but these errors were encountered: