/*[deutsch]
<p>Subtrahiert die angegebenen Jahre von diesem Kalenderquartal. </p>

@param   years       the count of years to be subtracted
@return  result of subtraction
546479
public CalendarQuarter minus(Years<CalendarUnit> years) {

        if (years.isEmpty()) {
            return this;
        }

        return CalendarQuarter.of(MathUtils.safeSubtract(this.year, years.getAmount()), this.quarter);

    }
539734
public int getYear()
    {
        Timestamp adjusted = this;

        if (this._offset != null) {
            if (this._offset.intValue() != 0) {
                adjusted = make_localtime();
            }
        }
        return adjusted._year;
    }
1150156
public static <D extends Comparable> DateTimeExpression<D> addYears(DateTimeExpression<D> date, int years) {
        return Expressions.dateTimeOperation(date.getType(), Ops.DateTimeOps.ADD_YEARS, date, ConstantImpl.create(years));
    }
76192
private void getYearlyDates(Calendar calendar, List<Date> dates)
   {
      if (m_relative)
      {
         getYearlyRelativeDates(calendar, dates);
      }
      else
      {
         getYearlyAbsoluteDates(calendar, dates);
      }
   }
1001027
public static PeriodType years() {
        PeriodType type = cYears;
        if (type == null) {
            type = new PeriodType(
                "Years",
                new DurationFieldType[] { DurationFieldType.years() },
                new int[] { 0, -1, -1, -1, -1, -1, -1, -1, }
            );
            cYears = type;
        }
        return type;
    }
177219
public static Date plusYears(Date date, int years) {
		return plus(date, years, DateTimeField.YEAR);
	}
363900
public static Year toYear(final Calendar self) {
        return Year.of(self.get(Calendar.YEAR));
    }
1137728
public function minusYears(int $years) : Period
    {
        if ($years === 0) {
            return $this;
        }

        return new Period($this->years - $years, $this->months, $this->days);
    }
320789
private static int getYear(CSLDate date, CSLDateParser dateParser) {
		if (date == null) {
			return -1;
		}
		if (date.getDateParts() == null ||
				date.getDateParts().length == 0 ||
				date.getDateParts()[0] == null ||
				date.getDateParts()[0].length == 0) {
			if (date.getRaw() != null && !date.getRaw().isEmpty()) {
				CSLDate d = dateParser.parse(date.getRaw());
				return getYear(d, dateParser);
			}
			return -1;
		}
		return date.getDateParts()[0][0];
	}
1344345
public DateFuncSup nextYear(int next) {
                Calendar cal = Calendar.getInstance();
                cal.setTime(date);
                cal.add(Calendar.YEAR, next);
                date.setTime(cal.getTimeInMillis());
                return this;
        }
469734
@Override
  public Double subtract12(Double arg1, Double arg2) {
    if (arg1 == null || arg2 == null) {
      return Double.NaN;
    } else {
      return arg1 - arg2;
    }
  }
622415
int subtract(MutableBigInteger b) {
        MutableBigInteger a = this;

        int[] result = value;
        int sign = a.compare(b);

        if (sign == 0) {
            reset();
            return 0;
        }
        if (sign < 0) {
            MutableBigInteger tmp = a;
            a = b;
            b = tmp;
        }

        int resultLen = a.intLen;
        if (result.length < resultLen)
            result = new int[resultLen];

        long diff = 0;
        int x = a.intLen;
        int y = b.intLen;
        int rstart = result.length - 1;

        // Subtract common parts of both numbers
        while (y > 0) {
            x--; y--;

            diff = (a.value[x+a.offset] & LONG_MASK) -
                   (b.value[y+b.offset] & LONG_MASK) - ((int)-(diff>>32));
            result[rstart--] = (int)diff;
        }
        // Subtract remainder of longer number
        while (x > 0) {
            x--;
            diff = (a.value[x+a.offset] & LONG_MASK) - ((int)-(diff>>32));
            result[rstart--] = (int)diff;
        }

        value = result;
        intLen = resultLen;
        offset = value.length - resultLen;
        normalize();
        return sign;
    }
1303639
public static Years<Weekcycle> between(CalendarWeek w1, CalendarWeek w2) {

        int delta = w2.getYear() - w1.getYear();

        if (delta > 0) {
            if (w2.getWeek() < w1.getWeek()) {
                delta--;
            }
        } else if (delta < 0) {
            if (w2.getWeek() > w1.getWeek()) {
                delta++;
            }
        }

        return Years.ofWeekBased(delta);

    }
523569
public int getEraYear(final Calendar cal) {
        ArgUtils.notNull(cal, "cal");
        
        final Calendar startCal = Calendar.getInstance(TimeZone.getTimeZone("GMT-00:00"));
        startCal.setTime(startDate);
        
        final int diff = cal.get(Calendar.YEAR) - startCal.get(Calendar.YEAR) + 1;
        return diff;
        
    }
900347
public static Date addYears(final Date date, final int addYears)
	{
		final Calendar dateOnCalendar = Calendar.getInstance();
		dateOnCalendar.setTime(date);
		dateOnCalendar.add(Calendar.YEAR, addYears);
		return dateOnCalendar.getTime();
	}
175523
public long add(long instant, int years) {
        if (years == 0) {
            return instant;
        }
        return set(instant, get(instant) + years);
    }
103275
public function minusYears(int $years) : LocalDateTime
    {
        if ($years === 0) {
            return $this;
        }

        return new LocalDateTime($this->date->minusYears($years), $this->time);
    }