diff --git a/src/NodaTimeSplitter.php b/src/NodaTimeSplitter.php index f6d6730..b5e98e5 100644 --- a/src/NodaTimeSplitter.php +++ b/src/NodaTimeSplitter.php @@ -294,7 +294,11 @@ final class NodaTimeSplitter { $end = "-" . substr($datum, 5, 4); return [$start, $end, "00", "00", "-"]; } - + if (preg_match("/^[0-9][0-9][0-9][0-9](\-|\/)[0-9][0-9][0-9] v\. Chr\.$/", $datum)) { + $start = "-" . substr($datum, 0, 4); + $end = "-" . substr($datum, 5, 3); + return [$start, $end, "00", "00", "-"]; + } if (preg_match("/^[0-9][0-9][0-9](\-|\/)[0-9][0-9][0-9] v\. Chr\.$/", $datum)) { $start = "-" . substr($datum, 0, 3); $end = "-" . substr($datum, 4, 3); @@ -343,6 +347,11 @@ final class NodaTimeSplitter { $datum = self::clean_input($datum); + if (preg_match("/^Kr\.\ e\.\ [0-9][0-9][0-9][0-9]$/", $datum)) { + $start = "-" . substr($datum, 7, 4); + return [$start, $start, "00", "00", "-"]; + } + if (self::stri_occurs($datum, self::STOP_STRINGS_HUNGARIAN)) { return []; }