Add tests for German dates, enable splitting of 5 digit timespans

This commit is contained in:
2020-09-26 15:10:06 +02:00
committed by Stefan Rohde-Enslin
parent 14b0d8037d
commit 3058f25a1c
4 changed files with 193 additions and 1 deletions

View File

@ -431,7 +431,11 @@ final class NodaTimeAutotranslater {
foreach (self::LANGS_TO_CE_FORMAT as $tLang => $ceFormat) {
if ($suffixMode === 2) {
$ceIndicatorsToRemove = explode("%s", self::LANGS_TO_CE_FORMAT[$tLang]);
$year = self::getTranslations($timeInfoToCopy)[$tLang];
foreach ($ceIndicatorsToRemove as $ceIndicatorToRemove) {
$year = str_replace($ceIndicatorToRemove, "", $year);
}
}
else {
if ($start === $end) {