Add tests for splitting Hungarian dates

This commit is contained in:
2020-09-26 14:15:15 +02:00
committed by Stefan Rohde-Enslin
parent d56d47aee1
commit 14b0d8037d
2 changed files with 179 additions and 2 deletions

View File

@ -388,11 +388,11 @@ final class NodaTimeSplitter {
$end = $start;
$start = $startToSet;
}
return [$start, $end, $output[2], $output[3], '-'];
return [$start, $end, $output[2], $output[3], '-', ""];
}
}
if (preg_match("/^[0-9][0-9][0-9][0-9]\-től(\ |\-)[0-9][0-9][0-9][0-9]\-ig$/", $datum)) {
if (preg_match("/^[0-9][0-9][0-9][0-9]\-t(ő|ó)l(\ |\-)[0-9][0-9][0-9][0-9]\-ig$/", $datum)) {
$start = substr($datum, 0, 4);
$end = substr($datum, -7, 4);
return [$start, $end, "00", "00", "+", ""];