sul-dlss / dlme

Digital Library of the Middle East web application, based on Spotlight
https://dlmenetwork.org/
Other
19 stars 2 forks source link

Display both Gregorian and Hijri dates on results and show pages #693

Closed ggeisler closed 4 years ago

ggeisler commented 4 years ago

Goal is for the user to see the object's date value according to both the Gregorian and Hijri calendars, when the object data supports this (though I believe all records should have the data to support this). We also want to show, separately, the original or source value for the object date, since it can include values that are meaningful to the user but not translatable between calendar systems.

Show page examples

Below left are the IR values for the cho_date and cho_date_range_xxxx fields. The recommendation is to use the cho_date_range_xxxx values to populate a Date field, shown first, followed by a "Source date" field that contains the cho_date value(s). Below right is an excerpt from the show page metadata for the item using this approach:

Screen Shot 2019-11-18 at 2 16 08 PM

Displaying the cho_date value(s) as the "Source date" field is straightforward.

For cho_date_range_xxxx we'd need to combine the values from the two source fields and display them on the same line, with the " - ", "(Gregorian)", " / ", and "(Hijri)" text injected.

Here's a slightly different example (value of the cho_date field is a bit different) of the source-to-desired-display, but pretty much the same approach (as best I can tell, the source data for these fields across all of our records pretty consistently matches one of these two patterns):

Screen Shot 2019-11-18 at 2 29 02 PM

Result page example

For a search result item, we want to do pretty much the same thing, only I think we might only want to show the "Date" field based on the cho_date_range_xxxx values and omit the "Source date" field.

But the "Date" value here would be exactly the same as described in the Show page examples above. Here's the result item entry for the first example item above:

Screen Shot 2019-11-18 at 2 15 31 PM
ggeisler commented 4 years ago

I didn't include this in my original comment, but I noticed that there can be records where only cho_date_range_norm is present (no cho_date_range_hijri). In those cases I'd suggest we err on the side of clarity and still include the "(Gregorian)", so:

Date: -5000 - -2702 (Gregorian)

(or vice versa if cho_date_range_hijri is present but not cho_date_range_norm)