Skip to content

Commit

Permalink
Resolves #819.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjordan committed Aug 26, 2024
1 parent 2e0f7f5 commit fe61456
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ def test_validate_good_edtf_values(self):
"2001-24",
"2001-31",
"193X/196X",
"195X-01~",
"198X?",
"19XX?",
"2XXX?",
Expand Down
4 changes: 4 additions & 0 deletions workbench_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7578,6 +7578,10 @@ def validate_edtf_fields(config, field_definitions, csv_data):

def validate_edtf_date(date):
date = date.strip()
# 195X-01~
# nnnX-nn~
if re.match(r"^[1-2]\d\dX\-\d\d\~", date):
return True
# nnnX?
if re.match(r"^[1-2]\d\dX\?", date):
return True
Expand Down

0 comments on commit fe61456

Please sign in to comment.