delta = getValueInMilliseconds() + ((DateValue)other).calendar.getTimeInMillis(); return new DateTimeValue(delta, ((DateValue)other).tzOffset);
long delta = getValueInMilliseconds() + ((AbstractDateTimeValue) other).calendar.getTimeInMillis(); int tzOffset = ((AbstractDateTimeValue) other).tzOffset; switch(other.getType()) { case Type.TIME: return new TimeValue(delta, tzOffset); case Type.DATE_TIME: return new DateTimeValue(delta, tzOffset); case Type.DATE: return new DateValue(delta, tzOffset); }
	public ComputableValue plus(ComputableValue other) throws XPathException {		long delta;		switch(other.getType()) {			case Type.DAY_TIME_DURATION:				return new DayTimeDurationValue(getValueInMilliseconds() + ((DayTimeDurationValue)other).getValueInMilliseconds());			case Type.TIME:				delta = getValueInMilliseconds() + ((TimeValue)other).calendar.getTimeInMillis();				return new TimeValue(delta, ((TimeValue)other).tzOffset);			case Type.DATE_TIME:				delta = getValueInMilliseconds() + ((DateTimeValue)other).calendar.getTimeInMillis();				return new DateTimeValue(delta, ((DateTimeValue)other).tzOffset);			case Type.DATE:				delta = getValueInMilliseconds() + ((DateValue)other).calendar.getTimeInMillis();				return new DateTimeValue(delta, ((DateValue)other).tzOffset);			default:				throw new XPathException("Operand to plus should be of type xdt:dayTimeDuration, xs:time, " +					"xs:date or xs:dateTime; got: " +					Type.getTypeName(other.getType()));		}	}