Add condition to split times like "xxxx bis yyyy"

This commit is contained in:
Joshua Ramon Enslin 2021-03-26 12:32:27 +01:00
parent c964053c91
commit e957db4210
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -391,6 +391,12 @@ final class NodaTimeSplitter {
}
}
if (\preg_match("/^[0-9][0-9][0-9][0-9]\ bis [0-9][0-9][0-9][0-9]$/", $datum)) {
$start = \substr($datum, 0, 4);
$end = \substr($datum, -4);
return [$start, $end, "00", "00", "+", ""];
}
$datum = \str_replace(". ", ".", $datum);
if (self::stri_occurs($datum, self::STOP_STRINGS_GERMAN)) {