dojson: recognize more defense dates from 500__a
Closed this issue · 1 comments
jacquerie commented
From @jacquerie on April 11, 2017 8:13
inspirehep/inspire-next#2052 expanded the regexp that we use to extract the defense date from the 500
MARC key, but is still missing cases like
<datafield tag="500" ind1=" " ind2=" ">
<subfield code="a">Presented on Dec 1992</subfield>
</datafield>
from https://inspirehep.net/record/887715/export/xme.
Copied from original issue: inspirehep/inspire-next#2215
jacquerie commented
For this we could probably use http://dateutil.readthedocs.io/en/stable/parser.html#dateutil.parser.parse and a hack similar to one described in http://stackoverflow.com/questions/8434854/parsing-a-date-in-python-without-using-a-default to be able to parse incomplete dates.