IQSS / dataverse

Open source research data repository software
http://dataverse.org
Other
882 stars 494 forks source link

Feature Request: BCE dates #10843

Open apmireia opened 2 months ago

apmireia commented 2 months ago

Overview of the Feature Request As mentioned in this discussion (https://groups.google.com/g/dataverse-community/c/Bj_dbHTeu2o/m/fFyyWfAsBAAJ), it would be interesting if Dataverse could support BCE (Before Common Era) dates. This functionality would greatly benefit datasets related to fields such as ancient history or archaeology.

image

What kind of user is the feature intended for? API User, Curator, Depositor

What inspired the request? We have several research centers that work with archaeological data.

What existing behavior do you want changed? Allowing negative dates to be added, particularly in the 'time period covered' field, would be very useful.

pdurbin commented 4 weeks ago

@apmireia thanks for opening this issue.

BC dates are being discussed here:

vera commented 4 weeks ago

To summarize the discussion in the PR linked by Phil:

Dataverse currently already supports the entry of dates in the format "yyyy BC" (it's just not documented):

https://github.com/IQSS/dataverse/blob/d039a108f992f170d5323a26a6d6f7dafb14029b/src/main/java/edu/harvard/iq/dataverse/DatasetFieldValueValidator.java#L124-L129

However, search capabilities for date fields in Dataverse are currently limited, because they are treated as text strings rather than dates.

Since the Solr search index underlying Dataverse supports BC dates (using the ISO 8601 format: 1 BC = +0000, 2 BC = -0001, and so on), I think we could add better search capabilities for BC dates relatively easily after #10887 is merged.