YearMonthDurationValue value = (YearMonthDurationValue) other; ncal = (Calendar) calendar.clone(); ncal.add(Calendar.YEAR, (value.negative ? -value.year : value.year)); ncal.add(Calendar.MONTH, (value.negative ? -value.month : value.month)); return new DateValue(ncal, tzOffset);
return other.plus(this);
	public ComputableValue plus(ComputableValue other) throws XPathException {		Calendar ncal;		switch (other.getType()) {			case Type.YEAR_MONTH_DURATION :				YearMonthDurationValue value = (YearMonthDurationValue) other;				ncal = (Calendar) calendar.clone();				ncal.add(Calendar.YEAR, (value.negative ? -value.year : value.year));				ncal.add(Calendar.MONTH, (value.negative ? -value.month : value.month));				return new DateValue(ncal, tzOffset);			case Type.DAY_TIME_DURATION :				DayTimeDurationValue dtv = (DayTimeDurationValue) other;				ncal = (Calendar) calendar.clone();				ncal.add(Calendar.DATE, (dtv.negative ? -dtv.day : dtv.day));				return new DateValue(ncal, tzOffset);			default :				throw new XPathException(					"Operand to plus should be of type xdt:yearMonthDuration or xdt:dayTimeDuration; got: "						+ Type.getTypeName(other.getType()));		}	}