Add the specified years to the specified time instant.

@see org.joda.time.DateTimeField#add
@param instant  the time instant in millis to update.
@param years  the years to add (can be negative).
@return the updated time instant.
175523
public long add(long instant, int years) {
        if (years == 0) {
            return instant;
        }
        return set(instant, get(instant) + years);
    }
945354
private void addYear(int i) {
        Calendar cal = Calendar.getInstance();
        cal.set(getDisplayYear(), 1, 1);
        cal.add(Calendar.YEAR, i);
        yearTextField.setText(String.valueOf(cal.get(Calendar.YEAR)));
    }
300760
int getDaysInMonthMax(long instant) {
        int thisYear = getYear(instant);
        int thisMonth = getMonthOfYear(instant, thisYear);
        return getDaysInYearMonth(thisYear, thisMonth);
    }
313941
public function addValidYear( $year )
	{
		if ( is_array( $year ) )
		{
			$this->validYears += $year;
		}
		elseif ( $year !== null )
		{
			$this->validYears[] = $year;
		}
	}
1143014
protected static int yearFrom2Digits(int shortYear, int currentYear) {
        if (shortYear < 100) {
            shortYear += currentYear - (currentYear % 100);
            if (Math.abs(shortYear - currentYear) >= 50) {
                if (shortYear < currentYear) {
                    return shortYear + 100;
                } else {
                    return shortYear - 100;
                }
            }
        }
        return shortYear;
    }
603127
public void setYear(String newYear)
	{
		if (newYear.length() > YEAR_SIZE)
		{
			year = newYear.substring(0, YEAR_SIZE);
		}
		else
		{
			year = newYear;
		}
	}
541312
function(year) {
	var yr;
	
	if (!year) {
		
		// initialize date "buckets" for year and month;
		year = [1900, 2100];
		this._years = {};
		for (yr = year[0]; yr <= year[1]; yr += 1) {
			this._years[yr] = new Year(yr);
		}
	} else {
		this.year = year;
	}
	return this;
}
728348
public static Date addMilliseconds(final Date date, final int addMilliseconds)
	{
		final Calendar dateOnCalendar = Calendar.getInstance();
		dateOnCalendar.setTime(date);
		dateOnCalendar.add(Calendar.MILLISECOND, addMilliseconds);
		return dateOnCalendar.getTime();
	}
870788
public void setValue(int years, int months, int days, int hours, int minutes, double seconds) {
    setYears(years);
    setMonths(months);
    setDays(days);
    setHours(hours);
    setMinutes(minutes);
    setSeconds(seconds);
  }
20161
public static Date addYear(Date date, int amt) {
		return addDateField(date,Calendar.YEAR,amt);
	}
686137
private void addMonth(int i) {
        Calendar cal = Calendar.getInstance();
        cal.set(getDisplayYear(), getDisplayMonth() - 1, 1);
        int month = cal.get(Calendar.MONTH) + 1;
        if (i > 0 && month == 12) {
            addYear(1);
        }

        if (i < 0 && month == 1) {
            addYear(-1);
        }
        cal.add(Calendar.MONTH, i);

        monthTextField.setText(String.valueOf(cal.get(Calendar.MONTH) + 1));

    }
322503
public static function addYear($ts = null, $num = 1)
	{
		return sfTime::add($ts, $num, sfTime::YEAR);
	}
1176971
public static int getYearFromData(Date date) {
		Calendar cal = Calendar.getInstance();
		cal.setTime(date);
		return cal.get(Calendar.YEAR);
	}
936598
public final void setCurrentAccYear(
    final Date pCurrentAccYear) {
    if (pCurrentAccYear == null) {
      this.currentAccYear = null;
    } else {
      this.currentAccYear = new Date(pCurrentAccYear.getTime());
    }
  }
411149
public void add(PGInterval interval) {
    interval.setYears(interval.getYears() + getYears());
    interval.setMonths(interval.getMonths() + getMonths());
    interval.setDays(interval.getDays() + getDays());
    interval.setHours(interval.getHours() + getHours());
    interval.setMinutes(interval.getMinutes() + getMinutes());
    interval.setSeconds(interval.getSeconds() + getSeconds());
  }
1106387
public final boolean add(final Period period) {
        if (isUtc()) {
            period.setUtc(true);
        }
        else {
            period.setTimeZone(timezone);
        }
        return periods.add(period);
    }
32652
private static long convertByWeekyear(final long instant, Chronology from, Chronology to) {
        long newInstant;
        newInstant = to.weekyear().set(0, from.weekyear().get(instant));
        newInstant = to.weekOfWeekyear().set(newInstant, from.weekOfWeekyear().get(instant));
        newInstant = to.dayOfWeek().set(newInstant, from.dayOfWeek().get(instant));
        newInstant = to.millisOfDay().set(newInstant, from.millisOfDay().get(instant));
        return newInstant;
    }