Time splitter: Handle first/second half

Close #31
This commit is contained in:
jrenslin committed 2025-04-05 00:09:39 +02:00
1 parent 8491b62a83
commit e8edb4a459
3 files changed
+25 -2

No files matched your search

+9
View File
@@ -1101,6 +1101,15 @@ final class NodaTimeSplitter {
if (empty($datum)) return '';
if (\preg_match("/^1\.\ (Halbjahr|Hälfte)\ [0-9]{4}$/", $datum)) {
$year = substr($datum, -4);
return "Januar $year-Juni $year";
}
if (\preg_match("/^2\.\ (Halbjahr|Hälfte)\ [0-9]{4}$/", $datum)) {
$year = substr($datum, -4);
return "Juli $year-Dezember $year";
}
$inputLength = strlen($datum);
// Hungarian year and month until month