Closed ndushay closed 5 years ago
I wrote this up before the parse_date gem had a lot of zing to it; let's talk through what is needed before running with what I wrote above. The patterns are valid -- it's the "what is the best way to get the date range" that might have changed, as a bunch of these patterns are now handled by ParseDate.range_array.
Algorithm for dates:
To populate
cho_date_range_norm
for Stanford collections:Note that mods
dateCreated
is only populated 9 times in a total of 6 records (we have 107 records).Mods
dateIssued
has 149 hits.The stanford-mods algorithm for pub date, https://github.com/sul-dlss/stanford-mods/blob/master/lib/stanford-mods/origin_info.rb#L188-L193, looks in dateIssued. We can prioritize
dateCreated
and usedateIssued
if there is nodateCreated
...I think this would look like the penn_museum date macro, in that we'd probably be looking at the
record
, not theaccumulator
, for the raw value, and then turn it into an array.In the current data, I'm only seeing single years.
Macro will look in
record
vardateCreated
ordateIssued
should take priority