happenings/utils/common.py
def _check_year(year, month, error, error_msg):
    """Checks that the year is within 50 years from now."""
    if year not in xrange((now.year - 50), (now.year + 51)):
        year = now.year
        month = now.month
        error = error_msg
    return year, month, error
def _check_year(year, month, error, error_msg):
    """Checks that the year is within 50 years from now."""
    if year not in xrange((now.year - 50), (now.year + 51)):
        year = now.year
        month = now.month
        error = error_msg
    return year, month, error
Checks that the year is within 50 years from now.