Add simpler to use function check_is_translatable to autotranslater
This commit is contained in:
parent
59c858fb0f
commit
3246a37c63
|
@ -37,6 +37,26 @@ final class NodaTimeAutotranslater {
|
|||
* @return string
|
||||
*/
|
||||
|
||||
/**
|
||||
* Checks if a time is translatable and returns an appropriate bool for easier
|
||||
* interfacing than through self::check_translatability.
|
||||
*
|
||||
* @param string $zeit_beginn Beginn year.
|
||||
* @param string $zeit_ende End year.
|
||||
* @param string $zeit_zaehlzeit_monat Counting time month.
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function check_is_translatable(string $zeit_beginn, string $zeit_ende, string $zeit_zaehlzeit_monat):bool {
|
||||
|
||||
if (self::check_translatability($zeit_beginn, $zeit_ende, $zeit_zaehlzeit_monat) === NodaTimeAutotranslaterStatus::NOT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a time is translatable.
|
||||
* Translatable times have either a counting time day and month or at least a month.
|
||||
|
|
Loading…
Reference in New Issue
Block a user