anvc / scalar

Born-digital, open source, media-rich scholarly publishing that’s as easy as blogging.
Other
231 stars 73 forks source link

CE dates in in timeline don't plot correctly #210

Closed alexdryden closed 1 year ago

alexdryden commented 1 year ago

When date metadata are prepended with CE, it shows up as BCE in the timeline rendering. Here is an example where you can see that the metadata for the media says 07/21/2020CE here but in the timeline it renders as BCE here.

We also noticed that using an em dash (—) to separate dates results in the item not being placed on the timeline.

alexdryden commented 1 year ago

Apologies! Here is the link to the timeline where the the date for "Hive" (third element in the timeline) is transformed from CE to BCE: https://iopn-sandbox.library.illinois.edu/scalar/timeline-dates/timeline-from-media

alexdryden commented 1 year ago

It looks like this is mistakenly preparing negative dates for the timeline when the era matches 'ad' or 'ce'. I can confirm that adding 'ad' or 'ce' to dates causes them to be placed in the BCE range on the timeline widget.