Skip to content

Commit

Permalink
Merge pull request #74 from acdh-oeaw/73-begin-and-end-extraction-fai…
Browse files Browse the repository at this point in the history
…ls-if-when-and-end-but-not-start

new date extraction rule #73
  • Loading branch information
csae8092 authored Sep 7, 2023
2 parents 1feca2d + 5ba3ab9 commit 93000ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions acdh_cidoc_pyutils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def extract_begin_end(
final_start, final_end = end, end
elif when and not start and not end:
final_start, final_end = when, when
elif when and end and not start:
final_start, final_end = when, end
else:
if start and end:
final_start, final_end = start, end
Expand All @@ -79,6 +81,8 @@ def extract_begin_end(
final_start, final_end = None, end
elif when and not start and not end:
final_start, final_end = when, when
elif when and end and not start:
final_start, final_end = when, end
return final_start, final_end


Expand Down

0 comments on commit 93000ba

Please sign in to comment.