def century(self, thai_digit: bool = False, buddhist_era: bool = True) -> str:
        """
        :param thai_digi:t use Thai digit or not (default: False)
        :param buddhist:_era use Buddist era or not (default: True)
        :example: '20'
        """
        end_century = 22
        if buddhist_era:
            end_century = 26
        text = str(self.random_element(range(1, end_century)))
        if thai_digit:
            text = text.translate(_HA_TH_DIGITS)
        return text

        :param thai_digi:t use Thai digit or not (default: False)
        :param buddhist:_era use Buddist era or not (default: True)
        :example: '20'
        
faker/providers/date_time/th_TH/__init__.py