Extend time splitter to handle e.g. "17./18. Jh."
This commit is contained in:
parent
db6953ca51
commit
874cfb8a6f
|
@ -912,7 +912,10 @@ final class NodaTimeSplitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 17.-18. Jahrhundert
|
// 17.-18. Jahrhundert
|
||||||
if (\preg_match("/^[0-9]{2}(\.|)(|\ Jh\.||\ Jahrhundert||\ sz||\ század)\-[0-9]{2}\.\ (Jh\.|Jahrhundert|sz|század)$/", $datum)) {
|
if (\preg_match("/^[0-9]{2}(\.|)(|\ Jh\.||\ Jahrhundert||\ sz||\ század)(\-|\/)[0-9]{2}\.\ (Jh\.|Jahrhundert|sz|század)$/", $datum)) {
|
||||||
|
if (\strpos($datum, '/') !== false) {
|
||||||
|
$datum = str_replace('/', '-', $datum);
|
||||||
|
}
|
||||||
if (($dashPos = \strpos($datum, "-")) !== false) {
|
if (($dashPos = \strpos($datum, "-")) !== false) {
|
||||||
return self::negotiate_century_span_bce_ce(\substr($datum, 0, 2), \substr($datum, $dashPos + 1, 2));
|
return self::negotiate_century_span_bce_ce(\substr($datum, 0, 2), \substr($datum, $dashPos + 1, 2));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user