-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
We have an EDTF field. Inputting range date such as 1964/2008 throws the following error: Could not parse the date '1964/2008'
Seems like this is where the checking happens: https://github.com/Islandora/controlled_access_terms/blob/2.x/src/EDTFUtils.php#L193
Additional Notes
- "islandora/controlled_access_terms": "2.x-dev",
- "professional-wiki/edtf": "^2.0"
<?php
$date = "1964/2008";
$pattern = '/^([%\?~])?(Y?(-?[\dX]+)(E\d)?(S\d)?)([%\?~])?-?([%\?~])?([\dX]{2})?([%\?~])?-?([%\?~])?([\dX]{2})?([%\?~])?$/';
preg_match($pattern, $date, $parsed_date);
print_r($parsed_date);
?>
It does work in the sandbox!
Metadata
Metadata
Assignees
Labels
No labels