def has_valid_birthday(self, value):
        from datetime import datetime
        if len(value) == 15:
            # 1st generation ID card
            time_string = value[6:12]
            format_string = "%y%m%d"
        else:
            # 2nd generation ID card
            time_string = value[6:14]
            format_string = "%Y%m%d"
        try:
            datetime.strptime(time_string, format_string)
            return True
        except ValueError:
            # invalid date
            return False
base64 encodes a single bytestring (and is tolerant to getting
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/contrib/localflavor/cn/forms.py/CNIDCardField.has_valid_birthday--crossover with--dataset/ETHPy150Open GeekTrainer/Flask/Work/Trivia - Module 5/env/Lib/site-packages/itsdangerous.py/base64_encode