aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/grobid_metadata.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_tools/importers/grobid_metadata.py')
-rw-r--r--python/fatcat_tools/importers/grobid_metadata.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/python/fatcat_tools/importers/grobid_metadata.py b/python/fatcat_tools/importers/grobid_metadata.py
index b84f7145..47a753a6 100644
--- a/python/fatcat_tools/importers/grobid_metadata.py
+++ b/python/fatcat_tools/importers/grobid_metadata.py
@@ -66,9 +66,10 @@ class GrobidMetadataImporter(FatcatImporter):
refs.append(ref)
release_date = None
+ release_year = None
if obj.get('date'):
- # TODO: only returns year, ever? how to handle?
- release_date = datetime.datetime(year=int(obj['date'][:4]), month=1, day=1).date()
+ # only returns year, ever?
+ release_year = int(obj['date'][:4])
if obj.get('doi'):
extra['doi'] = obj['doi']
@@ -88,6 +89,7 @@ class GrobidMetadataImporter(FatcatImporter):
title=obj['title'].strip(),
release_type="article-journal",
release_date=release_date,
+ release_year=release_year,
contribs=contribs,
refs=refs,
publisher=obj['journal'].get('publisher'),