From a4be5e876c982312419c8341e9f3d4f204844ca5 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Fri, 4 Feb 2022 02:49:44 +0100 Subject: [PATCH] =?UTF-8?q?Add=20t=C3=B3l=20to=20list=20of=20handled=20suf?= =?UTF-8?q?fixes=20in=20NodaTimeSplitter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "tól" is a suffix equivalent to "after" in Hungarian. --- src/NodaTimeSplitter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/NodaTimeSplitter.php b/src/NodaTimeSplitter.php index 7c91a77..5886772 100644 --- a/src/NodaTimeSplitter.php +++ b/src/NodaTimeSplitter.php @@ -113,6 +113,7 @@ final class NodaTimeSplitter { "eleje", "között", "töl", + "tól", "januárig", "februárig", "márciusig", @@ -824,7 +825,7 @@ final class NodaTimeSplitter { } // Endings beginning with a space - if (\preg_match("/(\-től)$/", $datum)) { + if (\preg_match("/(\-től|\-tól)$/", $datum)) { if (($spacePos = strrpos($datum, "-")) === false) { return []; }