def METHOD_NAME(self, days=30):
    """
    Remove expired elements from history
    :param days: number of days to keep
    """
    date = datetime.today() - timedelta(days)
    self.db.action(
        'DELETE '
        'FROM history '
        'WHERE date < ?',
        [date.strftime(History.date_format)]
    )