Computes the number from eastern sunday for the given year. Year should be greater the 1583.

@param year
The year to compute the number from eastern sunday.
@return The number from eastern sunday.
351452
public static int computeEasternSundayNumber(final int year)
	{
		final int i = year % 19;
		final int j = year / 100;
		final int k = year % 100;
		final int l = (19 * i + j - j / 4 - (j - (j + 8) / 25 + 1) / 3 + 15) % 30;
		final int m = (32 + 2 * (j % 4) + 2 * (k / 4) - l - k % 4) % 7;
		return (l + m - 7 * ((i + 11 * l + 22 * m) / 451) + 114);
	}
345216
static long transform(
        int relgregyear,
        int dayOfYear
    ) {

        if (relgregyear >= 1873) {
            return PlainDate.of(relgregyear, dayOfYear).getDaysSinceEpochUTC();
        } else {
            return START_OF_YEAR[relgregyear - 701] + dayOfYear - 1;
        }

    }
20363
def epiweeks_in_year(year: int) -> int:
    

    if date_to_epiweek(epiweek_to_date(Epiweek(year, 53))).year == year:
        return 53
    else:
        return 52
723962
private boolean advanceYear(Calendar cal, int year)
    {
        year = years.nextSetBit(year + 1 - ScheduleExpressionParser.MINIMUM_YEAR); // d665298
        if (year >= 0)
        {
            cal.set(Calendar.YEAR, year + ScheduleExpressionParser.MINIMUM_YEAR); // d665298
            return true;
        }

        return false;
    }
1073368
@Override
    HijrahDate plusYears(long years) {
        if (years == 0) {
            return this;
        }
        int newYear = Jdk8Methods.safeAdd(this.yearOfEra, (int)years);
        return HijrahDate.of(this.era, newYear, this.monthOfYear, this.dayOfMonth);
    }
1270767
protected static function isArithmeticLeapYear($year, $yearIsInGeorgian = false) {
        
        // a change for fit
        if ( ! $yearIsInGeorgian) {
            $year += static::HEGIRA_STARTING_YEAR;
        }
        
        $yearPositionInQuadCycle = static::calculateYearInQuadCycle($year) - 1;
        
        $arithmeticBreakPoints = [
            29,
            62,     // (29 + 33)
            95,     // (29 + 33 + 33)
            128,    // (29 + 33 + 33 + 33)
        ];
        
        foreach ($arithmeticBreakPoints as $i => $break) {
            if (isset($arithmeticBreakPoints[$i + 1])) {
                $nextBreak = $arithmeticBreakPoints[$i + 1];
                if ($yearPositionInQuadCycle >= $break && $yearPositionInQuadCycle < $nextBreak) {
                    $yearPositionInQuadCycle -= $break;
                    break;
                }
            }
        }
        
        // the first year is always a common year
        // other years whose ordinal numbers are divisible by 4 are leap years
        $isLeapYear = false;
        if ($yearPositionInQuadCycle != 0 && ($yearPositionInQuadCycle % 4) == 0) {
            $isLeapYear = true;
        }
        
        return $isLeapYear;
    }
1142746
public static int year(EvaluationContext ctx, Object date) {
        return Conversions.toDateOrDateTime(date, ctx).get(ChronoField.YEAR);
    }
629873
long getFirstWeekOfYearMillis(int year) {
        long jan1millis = getYearMillis(year);
        int jan1dayOfWeek = getDayOfWeek(jan1millis);
        
        if (jan1dayOfWeek > (8 - iMinDaysInFirstWeek)) {
            // First week is end of previous year because it doesn't have enough days.
            return jan1millis + (8 - jan1dayOfWeek)
                * (long)DateTimeConstants.MILLIS_PER_DAY;
        } else {
            // First week is start of this year because it has enough days.
            return jan1millis - (jan1dayOfWeek - 1)
                * (long)DateTimeConstants.MILLIS_PER_DAY;
        }
    }
410105
function(year) {
    var a = year % 19;
    var b = Math.floor(year / 100);
    var c = year % 100;
    var d = Math.floor(b / 4);
    var e = b % 4;
    var f = Math.floor((b + 8) / 25);
    var g = Math.floor((b - f + 1) / 3);
    var h = (19 * a + b - d - g + 15) % 30;
    var i = Math.floor(c / 4);
    var k = c % 4;
    var l = (32 + 2 * e + 2 * i - h - k) % 7;
    var m = Math.floor((a + 11 * h + 22 * l) / 451);
    var n0 = h + l + 7 * m + 114;
    var n = Math.floor(n0 / 31) - 1;
    var p = n0 % 31 + 1;
    var date = this.createDate(year, n + 1, p);
    return date;
  }
1332688
function (year) {
			var daysCount = 0;
			for (var i = 1; i <= 12; i++) {
				daysCount += this.daysInMonth(year, i);
			}
			return daysCount;
		}
751043
public static int getDayOfYear(Calendar cal, int type) {
        int jday = cal.get(Calendar.DAY_OF_YEAR);
        int mo = cal.get(java.util.Calendar.MONTH) + 1;
        if (type == CALENDAR_YEAR) {
            return jday;
        } else if (type == SOLAR_YEAR) {
            int day = cal.get(Calendar.DAY_OF_MONTH);
            return (mo == 12 && day > 21) ? (day - 21) : (jday + 10);
        } else if (type == WATER_YEAR) {
            return (mo > 9) ? (jday - (isLeapYear(cal.get(Calendar.YEAR)) ? 274 : 273)) : (jday + 92);
        }
        throw new IllegalArgumentException("getDayOfYear() type argument unknown");
    }
610037
def _GetNumberOfDaysInCentury(self, year):
    
    if year < 0:
      raise ValueError('Year value out of bounds.')

    year, _ = divmod(year, 100)

    if self._IsLeapYear(year):
      return 36525
    return 36524
1080938
public NumberExpression<Integer> yearWeek() {
        if (yearWeek == null) {
            yearWeek = Expressions.numberOperation(Integer.class, Ops.DateTimeOps.YEAR_WEEK, mixin);
        }
        return yearWeek;
    }
690981
private static int gregoYearFromIslamicStart(int year) {
        // ad hoc conversion, improve under #10752
        // rough est for now, ok for grego 1846-2138,
        // otherwise occasionally wrong (for 3% of years)
        int cycle, offset, shift = 0;
        if (year >= 1397) {
            cycle = (year - 1397) / 67;
            offset = (year - 1397) % 67;
            shift = 2*cycle + ((offset >= 33)? 1: 0);
        } else {
            cycle = (year - 1396) / 67 - 1;
            offset = -(year - 1396) % 67;
            shift = 2*cycle + ((offset <= 33)? 1: 0);
        }
        return year + 579 - shift;
    }
283604
public static Integer getGrade(Integer year, Integer grade, Integer onYear) {
		if (year == null || grade == null || onYear == null)
			return null;

		grade += onYear - year;
		if (grade < 0)
			grade = 0;
		else if (grade > 13)
			grade = 13;

		return grade;
	}
1162508
public int getDayOfYear() {

        int doy = this.iso.get(PlainDate.DAY_OF_YEAR);

        if (this.iso.getYear() < 1941) {
            if (this.iso.getMonth() >= 4) {
                doy -= (this.iso.isLeapYear() ? 91 : 90);
            } else {
                doy += 275; // 91 + 92 + 92
            }
        }

        return doy;

    }
376709
private static Set<Date> getHolidaySet(int year) {
		if (holidays == null) {
			holidays = new HashMap<Integer, Set<Date>>();
		}
		if (!holidays.containsKey(year)) {
			Set<Date> yearSet = new HashSet<Date>();

			// Add set holidays.
			yearSet.add(getDate(1, Calendar.JANUARY, year));
			yearSet.add(getDate(1, Calendar.MAY, year));
			yearSet.add(getDate(17, Calendar.MAY, year));
			yearSet.add(getDate(25, Calendar.DECEMBER, year));
			yearSet.add(getDate(26, Calendar.DECEMBER, year));

			// Add movable holidays - based on easter day.
			Calendar easterDay = dateToCalendar(getEasterDay(year));

			// Sunday before easter.
			yearSet.add(rollGetDate(easterDay, -7));

			// Thurday before easter.
			yearSet.add(rollGetDate(easterDay, -3));

			// Friday before easter.
			yearSet.add(rollGetDate(easterDay, -2));

			// Easter day.
			yearSet.add(easterDay.getTime());

			// Second easter day.
			yearSet.add(rollGetDate(easterDay, 1));

			// "Kristi himmelfart" day.
			yearSet.add(rollGetDate(easterDay, 39));

			// "Pinse" day.
			yearSet.add(rollGetDate(easterDay, 49));

			// Second "Pinse" day.
			yearSet.add(rollGetDate(easterDay, 50));

			holidays.put(year, yearSet);
		}
		return holidays.get(year);
	}