1900 - 2099 limit
    :param year: int
    :return: Easter day
970180
def easter(year=None):
    
    y = int(year) if year else _year
    n = y - 1900
    a = n % 19
    q = n // 4
    b = (7 * a + 1) // 19
    m = (11 * a + 4 - b) % 29
    w = (n + q + 31 - m) % 7
    d = 25 - m - w
    if d > 0:
        return datetime.date(y, 4, d)
    else:
        return datetime.date(y, 3, (31 + d))
410596
def _year_expand(s):
        
        regex = r"^((?:19|20)\d{2})?(\s*-\s*)?((?:19|20)\d{2})?$"
        try:
            start, dash, end = match(regex, ustr(s)).groups()
            start = start or 1900
            end = end or 2099
        except AttributeError:
            return 1900, 2099
        return (int(start), int(end)) if dash else (int(start), int(start))
629315
def set_limit(self, param):
        
        # TODO: Is not having leading zeroes / 4 digits an error?
        limit = int(param)
        if -2000 <= limit <= 6000:
            self.device.temperature_limit = limit / 10.0
        return ""
13724
def dst(self):
        

        if self.tzinfo is None:
            return None
        return self.tzinfo.dst(self.replace(year=2000))
931547
def _date_by_len(self, string):
        

        strlen = len(string)

        year_num = int(string[0:2])
        if year_num < 50:
            prefix = '20'
        else:
            prefix = '19'

        if strlen == 10:
            return datetime.strptime(prefix + string, '%Y%m%d%H%M')

        if strlen == 12:
            return datetime.strptime(prefix + string, '%Y%m%d%H%M%S')

        return string
926633
private static int EquivalentYear(int year)
    {
        int day = (int) DayFromYear(year) + 4;
        day = day % 7;
        if (day < 0)
            day += 7;
        // Years and leap years on which Jan 1 is a Sunday, Monday, etc.
        if (IsLeapYear(year)) {
            switch (day) {
                case 0: return 1984;
                case 1: return 1996;
                case 2: return 1980;
                case 3: return 1992;
                case 4: return 1976;
                case 5: return 1988;
                case 6: return 1972;
            }
        } else {
            switch (day) {
                case 0: return 1978;
                case 1: return 1973;
                case 2: return 1985;
                case 3: return 1986;
                case 4: return 1981;
                case 5: return 1971;
                case 6: return 1977;
            }
        }
        // Unreachable
        throw Kit.codeBug();
    }
460244
def day_of_year(date = self)
      date.month == 1 ? date.day : (DAYS_IN_YEAR[date.month - 2] + date.day)
    end
67801
def passport_series(self, year: int = None) -> str:
        
        if not year:
            year = self.random.randint(10, 18)

        region = self.random.randint(1, 99)
        return '{:02d} {}'.format(region, year)
529086
def _start_date_of_year(year: int) -> datetime.date:
    

    jan_one = datetime.date(year, 1, 1)
    diff = 7 * (jan_one.isoweekday() > 3) - jan_one.isoweekday()

    return jan_one + datetime.timedelta(days=diff)
693150
def random_date(start_year=2000, end_year=2020):
    
    return date(random.randint(start_year, end_year), random.randint(1, 12), random.randint(1, 28))
302211
def to_jd(year, month, day):
    ''''''
    legal_date(year, month, day)
    gyear = year + YEAR_EPOCH - 1

    return (
        gregorian.EPOCH - 1 + (365 * (gyear - 1)) +
        floor((gyear - 1) / 4) + (-floor((gyear - 1) / 100)) +
        floor((gyear - 1) / 400) + (month - 1) * 28 + day
    )
303203
private static int getFirstCalendarWeekAsDayOfYear(int year) {

        Weekday wdNewYear =
            Weekday.valueOf(GregorianMath.getDayOfWeek(year, 1, 1));
        int dow = wdNewYear.getValue(Weekmodel.ISO);

        return (
            (dow <= 8 - Weekmodel.ISO.getMinimalDaysInFirstWeek())
            ? 2 - dow
            : 9 - dow
        );

    }
581842
private final int yearType(int year)
    {
        int yearLength = handleGetYearLength(year);

        if (yearLength > 380) {
           yearLength -= 30;        // Subtract length of leap month.
        }

        int type = 0;

        switch (yearLength) {
            case 353:
                type = 0; break;
            case 354:
                type = 1; break;
            case 355:
                type = 2; break;
            default:
                throw new IllegalArgumentException("Illegal year length " + yearLength + " in year " + year);

        }
        return type;
    }
76718
def _parse_limit(self, element):
        
        # Is this a Global or User limit?
        limit_type = attribute(element, 'type', 'user')

        # Time unit conversions
        unit_conversions = {
            'seconds': 1,
            'minutes': 60,
            'hours':   3600,
            'days':    86400,
            'weeks':   604800,
            'months':  2592000,
            'years':   31536000
        }
        units = attribute(element, 'unit', 'seconds')
        if units not in unit_conversions:
            self._log.warn('Unrecognized time unit: {unit}'.format(unit=units))
            return

        try:
            limit = float(element.text)
        except (ValueError, TypeError):
            self._log.warn('Limit must contain a valid integer or float (Invalid limit: "{limit}")'
                           .format(limit=element.text))
            return

        if limit_type == 'global':
            self.global_limit = limit * unit_conversions[units]
            self.glimit_blocking = bool_attribute(element, 'blocking', self.glimit_blocking)
        elif limit_type == 'user':
            self.user_limit = limit * unit_conversions[units]
            self.ulimit_blocking = bool_attribute(element, 'blocking', self.ulimit_blocking)

        return
414231
function(year) {
			var date = this._validate(year, this.minMonth, this.minDay,
				$.calendars.local.invalidYear || $.calendars.regionalOptions[''].invalidYear);
			return (date.year() < 0 ? this.local.epochs[0] : this.local.epochs[1]);
		}
1150052
public static Date dateReservedYear(int year, boolean is000) {
        Calendar calendar = Calendar.getInstance();
        calendar.set(Calendar.YEAR, year);

        return is000 ? dateReservedYear000(calendar) : dateReservedYear999(calendar);
    }
428463
def get_victoria_day(self, year):
        
        may_24th = date(year, 5, 24)
        # Since "MON(day) == 0", it's either the difference between MON and the
        # current weekday (starting at 0), or 7 days before the May 24th
        shift = may_24th.weekday() or 7
        victoria_day = may_24th - timedelta(days=shift)
        return (victoria_day, "Victoria Day")