inspirehep / inspire-next

The INSPIRE repo.
https://inspirehep.net
GNU General Public License v3.0
59 stars 69 forks source link

dojson: recognize more defense dates from 500__a #2215

Closed jacquerie closed 7 years ago

jacquerie commented 7 years ago

https://github.com/inspirehep/inspire-next/pull/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.

jacquerie commented 7 years ago

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.

jacquerie commented 7 years ago

This issue was moved to inspirehep/inspire-dojson#10