Allow parsing of single-digits century spans also in the form of 1-3.

század
This commit is contained in:
Joshua Ramon Enslin 2020-09-24 15:49:42 +02:00 committed by Stefan Rohde-Enslin
parent 1668495573
commit 785b1c5156

View File

@ -653,6 +653,9 @@ final class NodaTimeSplitter {
if (preg_match("/^[0-9]\.\-[0-9]\.\ (Jh\.|Jahrhundert|század)$/", $datum)) {
return [(string)(intval(substr($datum, 0, 1)) - 1) . "01", substr($datum, 3, 1) . "00", "00", "00", $bcBceIndicator, ""];
}
if (preg_match("/^[0-9]\-[0-9]\.\ (Jh\.|Jahrhundert|század)$/", $datum)) {
return [(string)(intval(substr($datum, 0, 1)) - 1) . "01", substr($datum, 2, 1) . "00", "00", "00", $bcBceIndicator, ""];
}
return [];