Allow parsing of single-digits century spans also in the form of 1-3.
század
This commit is contained in:
parent
1668495573
commit
785b1c5156
|
@ -653,6 +653,9 @@ final class NodaTimeSplitter {
|
||||||
if (preg_match("/^[0-9]\.\-[0-9]\.\ (Jh\.|Jahrhundert|század)$/", $datum)) {
|
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, ""];
|
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 [];
|
return [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user