From ddaa31646c887c59c9a9ac5d3b686aa09877ac44 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Thu, 24 Sep 2020 13:24:48 +0200 Subject: [PATCH] =?UTF-8?q?Enable=20splitting=20of=20es=20=C3=A9vek=20year?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/NodaTimeSplitter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NodaTimeSplitter.php b/src/NodaTimeSplitter.php index 1d01cd5..0023d69 100644 --- a/src/NodaTimeSplitter.php +++ b/src/NodaTimeSplitter.php @@ -659,13 +659,13 @@ final class NodaTimeSplitter { $datum = self::clean_input($datum); $bcBceIndicator = '+'; - if (preg_match("/^[0-9]0(er\ Jahre)$/", $datum)) { + if (preg_match("/^[0-9]0(er\ Jahre|\-es\ évek|\-as\ \évek)$/", $datum)) { $start = "19" . substr($datum, 0, 2); $ende = (string)(intval($start) + 9); return [$start, $ende, "00", "00", $bcBceIndicator, ""]; } - if (preg_match("/^[0-9][0-9][0-9]0(er\ Jahre)$/", $datum)) { + if (preg_match("/^[0-9][0-9][0-9]0(er\ Jahre|\-es\ évek|\-as\ \évek)$/", $datum)) { $start = substr($datum, 0, 4); $ende = (string)(intval($start) + 9); return [$start, $ende, "00", "00", $bcBceIndicator, ""];