Allow autotranslation of time spans before 1000 CE

This commit is contained in:
2020-09-23 17:03:12 +02:00
committed by Stefan Rohde-Enslin
parent 0f6a6ebc84
commit a4a94a8f8a
2 changed files with 45 additions and 9 deletions

View File

@ -264,10 +264,10 @@ final class NodaTimeAutotranslater {
*/
public static function check_translatability(string $zeit_beginn, string $zeit_ende, string $zeit_zaehlzeit_monat):int {
if (intval($zeit_beginn) > 1000 and $zeit_ende === "?") {
if ($zeit_ende === "?") {
return self::TRANSLATABLE_SINCE_START;
}
if (intval($zeit_ende) > 1000 and $zeit_beginn === "?") {
if ($zeit_beginn === "?") {
return self::TRANSLATABLE_UNTIL_END;
}
@ -347,7 +347,7 @@ final class NodaTimeAutotranslater {
*
* @return array<string>
*/
public function translateYearsWithSuffix(array $timeInfo):array {
public static function translateYearsWithSuffix(array $timeInfo):array {
$start = intval($timeInfo['zeit_beginn']);
$end = intval($timeInfo['zeit_ende']);