diff --git a/src/NodaTimeSplitter.php b/src/NodaTimeSplitter.php index 71b3ef3..7c91a77 100644 --- a/src/NodaTimeSplitter.php +++ b/src/NodaTimeSplitter.php @@ -249,7 +249,13 @@ final class NodaTimeSplitter { } else if ($moda[0] === $moda[1] && trim((string)$moda[2], " 0") !== "" && trim((string)$moda[3], " 0") === "") { setlocale(LC_TIME, NodaTimeAutotranslater::LANGS_TO_LOCALES['de']); - return $prefix . strftime(getMonthFormatByLang("de"), MD_STD::strtotime("{$moda[0]}-{$moda[2]}-01 01:01:01")) . $suffix; + + try { + return $prefix . strftime(getMonthFormatByLang("de"), MD_STD::strtotime("{$moda[0]}-{$moda[2]}-01 01:01:01")) . $suffix; + } + catch (MDInvalidInputDate $e) { + return ""; + } } return "";